comparison Core/OrthancException.h @ 1577:7aac0cddd42e

generation of the error codes from a Python script
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 25 Aug 2015 15:10:45 +0200
parents de54c19fc44d
children bd1889029cbb
comparison
equal deleted inserted replaced
1576:de54c19fc44d 1577:7aac0cddd42e
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 static HttpStatus ConvertToHttpStatus(ErrorCode code);
48
49 public: 47 public:
50 OrthancException(const char* custom) :
51 errorCode_(ErrorCode_Custom),
52 httpStatus_(HttpStatus_500_InternalServerError),
53 custom_(custom)
54 {
55 }
56
57 OrthancException(const std::string& custom) : 48 OrthancException(const std::string& custom) :
58 errorCode_(ErrorCode_Custom), 49 errorCode_(ErrorCode_Custom),
59 httpStatus_(HttpStatus_500_InternalServerError), 50 httpStatus_(HttpStatus_500_InternalServerError),
60 custom_(custom) 51 custom_(custom)
61 { 52 {