comparison Core/PalanthirException.h @ 50:a15e90e5d6fc

rename in code
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 05 Sep 2012 15:50:12 +0200
parents 491a97842e31
children
comparison
equal deleted inserted replaced
49:e1a3ae0dadf3 50:a15e90e5d6fc
1 /** 1 /**
2 * Palantir - A Lightweight, RESTful DICOM Store 2 * Palanthir - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012 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
21 #pragma once 21 #pragma once
22 22
23 #include <string> 23 #include <string>
24 #include "Enumerations.h" 24 #include "Enumerations.h"
25 25
26 namespace Palantir 26 namespace Palanthir
27 { 27 {
28 class PalantirException 28 class PalanthirException
29 { 29 {
30 private: 30 private:
31 ErrorCode error_; 31 ErrorCode error_;
32 std::string custom_; 32 std::string custom_;
33 33
34 public: 34 public:
35 static const char* GetDescription(ErrorCode error); 35 static const char* GetDescription(ErrorCode error);
36 36
37 PalantirException(const std::string& custom) 37 PalanthirException(const std::string& custom)
38 { 38 {
39 error_ = ErrorCode_Custom; 39 error_ = ErrorCode_Custom;
40 custom_ = custom; 40 custom_ = custom;
41 } 41 }
42 42
43 PalantirException(ErrorCode error) 43 PalanthirException(ErrorCode error)
44 { 44 {
45 error_ = error; 45 error_ = error;
46 } 46 }
47 47
48 ErrorCode GetErrorCode() const 48 ErrorCode GetErrorCode() const