# HG changeset patch # User am@osimis.io # Date 1543827745 -3600 # Node ID 65b20d922e1039d3e2da75492b401fc84463e2e6 # Parent dc18d5804746946ebc8563116448547c8817aebc throw instead of assert when Dicom tags can not be simplified diff -r dc18d5804746 -r 65b20d922e10 OrthancServer/ServerToolbox.cpp --- a/OrthancServer/ServerToolbox.cpp Fri Nov 30 17:19:57 2018 +0100 +++ b/OrthancServer/ServerToolbox.cpp Mon Dec 03 10:02:25 2018 +0100 @@ -78,7 +78,10 @@ const Json::Value& source, DicomToJsonFormat format) { - assert(source.isObject()); + if (!source.isObject()) + { + throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); + } target = Json::objectValue; Json::Value::Members members = source.getMemberNames();