Mercurial > hg > orthanc
diff OrthancServer/DicomProtocol/DicomServer.cpp @ 1582:bd1889029cbb
encoding of exceptions
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Aug 2015 17:39:38 +0200 |
parents | f967bdf8534e |
children | d3ba98d6b6e9 |
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomServer.cpp Tue Aug 25 16:18:37 2015 +0200 +++ b/OrthancServer/DicomProtocol/DicomServer.cpp Tue Aug 25 17:39:38 2015 +0200 @@ -162,7 +162,7 @@ if (cond.bad()) { LOG(ERROR) << "cannot create network: " << cond.text(); - throw OrthancException("Cannot create network"); + throw OrthancException(ErrorCode_DicomPortInUse); } LOG(INFO) << "DICOM server started"; @@ -279,12 +279,12 @@ { if (aet.size() == 0) { - throw OrthancException("Too short AET"); + throw OrthancException(ErrorCode_BadApplicationEntityTitle); } if (aet.size() > 16) { - throw OrthancException("AET must be shorter than 16 characters"); + throw OrthancException(ErrorCode_BadApplicationEntityTitle); } for (size_t i = 0; i < aet.size(); i++) @@ -327,7 +327,7 @@ } else { - throw OrthancException("No C-FIND request handler factory"); + throw OrthancException(ErrorCode_NoCFindHandler); } } @@ -350,7 +350,7 @@ } else { - throw OrthancException("No C-MOVE request handler factory"); + throw OrthancException(ErrorCode_NoCMoveHandler); } } @@ -373,7 +373,7 @@ } else { - throw OrthancException("No C-STORE request handler factory"); + throw OrthancException(ErrorCode_NoCStoreHandler); } } @@ -396,7 +396,7 @@ } else { - throw OrthancException("No application entity filter"); + throw OrthancException(ErrorCode_NoApplicationEntityFilter); } }