Mercurial > hg > orthanc
changeset 3430:4c45e018bd3d
improved logging
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 17 Jun 2019 23:35:46 +0200 |
parents | decbede6e3ad |
children | e0841192d7d0 |
files | Core/DicomParsing/ParsedDicomFile.cpp OrthancServer/ServerJobs/ResourceModificationJob.cpp |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomParsing/ParsedDicomFile.cpp Wed Jun 12 18:04:53 2019 +0200 +++ b/Core/DicomParsing/ParsedDicomFile.cpp Mon Jun 17 23:35:46 2019 +0200 @@ -920,7 +920,7 @@ !GetTagValue(seriesUid, DICOM_TAG_SERIES_INSTANCE_UID) || !GetTagValue(instanceUid, DICOM_TAG_SOP_INSTANCE_UID)) { - throw OrthancException(ErrorCode_BadFileFormat); + throw OrthancException(ErrorCode_BadFileFormat, "missing PatientID, StudyInstanceUID, SeriesInstanceUID or SOPInstanceUID"); } return DicomInstanceHasher(patientId, studyUid, seriesUid, instanceUid);
--- a/OrthancServer/ServerJobs/ResourceModificationJob.cpp Wed Jun 12 18:04:53 2019 +0200 +++ b/OrthancServer/ServerJobs/ResourceModificationJob.cpp Mon Jun 17 23:35:46 2019 +0200 @@ -158,9 +158,9 @@ originalHasher.reset(new DicomInstanceHasher(original.GetHasher())); modified.reset(original.Clone(true)); } - catch (OrthancException&) + catch (OrthancException& e) { - LOG(WARNING) << "An instance was removed after the job was issued: " << instance; + LOG(WARNING) << "An error occurred while executing a Modification job on instance " << instance << ": " << e.GetDetails(); return false; }