Mercurial > hg > orthanc
comparison Core/OrthancException.h @ 1582:bd1889029cbb
encoding of exceptions
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Aug 2015 17:39:38 +0200 |
parents | 7aac0cddd42e |
children | 9ea3d082b064 |
comparison
equal
deleted
inserted
replaced
1581:357c4bb15701 | 1582:bd1889029cbb |
---|---|
42 protected: | 42 protected: |
43 ErrorCode errorCode_; | 43 ErrorCode errorCode_; |
44 HttpStatus httpStatus_; | 44 HttpStatus httpStatus_; |
45 std::string custom_; | 45 std::string custom_; |
46 | 46 |
47 public: | |
48 OrthancException(const std::string& custom) : | 47 OrthancException(const std::string& custom) : |
49 errorCode_(ErrorCode_Custom), | 48 errorCode_(ErrorCode_Custom), |
50 httpStatus_(HttpStatus_500_InternalServerError), | 49 httpStatus_(HttpStatus_500_InternalServerError), |
51 custom_(custom) | 50 custom_(custom) |
52 { | 51 { |
53 } | 52 } |
54 | 53 |
54 public: | |
55 OrthancException(ErrorCode errorCode) : | 55 OrthancException(ErrorCode errorCode) : |
56 errorCode_(errorCode), | 56 errorCode_(errorCode), |
57 httpStatus_(ConvertErrorCodeToHttpStatus(errorCode)) | 57 httpStatus_(ConvertErrorCodeToHttpStatus(errorCode)) |
58 { | 58 { |
59 } | 59 } |