comparison Core/OrthancException.h @ 759:8cfc6119a5bd dicom-rt

integration mainline -> dicom-rt
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Apr 2014 16:04:55 +0200
parents 2d0a347e8cfc
children 6e7e5ed91c2d
comparison
equal deleted inserted replaced
605:b82292ba2083 759:8cfc6119a5bd
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2013 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * This program is free software: you can redistribute it and/or 6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, either version 3 of the 8 * published by the Free Software Foundation, either version 3 of the
44 std::string custom_; 44 std::string custom_;
45 45
46 public: 46 public:
47 static const char* GetDescription(ErrorCode error); 47 static const char* GetDescription(ErrorCode error);
48 48
49 OrthancException(const char* custom) 49 OrthancException(const char* custom) :
50 error_(ErrorCode_Custom),
51 custom_(custom)
50 { 52 {
51 error_ = ErrorCode_Custom;
52 custom_ = custom;
53 } 53 }
54 54
55 OrthancException(const std::string& custom) 55 OrthancException(const std::string& custom) :
56 error_(ErrorCode_Custom),
57 custom_(custom)
56 { 58 {
57 error_ = ErrorCode_Custom;
58 custom_ = custom;
59 } 59 }
60 60
61 OrthancException(ErrorCode error) 61 OrthancException(ErrorCode error) : error_(error)
62 { 62 {
63 error_ = error;
64 } 63 }
65 64
66 ErrorCode GetErrorCode() const 65 ErrorCode GetErrorCode() const
67 { 66 {
68 return error_; 67 return error_;