Mercurial > hg > orthanc
comparison OrthancCppClient/HttpException.h @ 60:77aec9be0a51 orthanc-renaming
renaming of cppclient
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 16 Sep 2012 09:29:54 +0200 |
parents | 4bc019d2f969 |
children | e3a40c7846b8 |
comparison
equal
deleted
inserted
replaced
59:c996319e90bc | 60:77aec9be0a51 |
---|---|
1 /** | 1 /** |
2 * Palanthir - A Lightweight, RESTful DICOM Store | 2 * Orthanc - 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 * Permission is hereby granted, free of charge, to any person | 6 * Permission is hereby granted, free of charge, to any person |
7 * obtaining a copy of this software and associated documentation | 7 * obtaining a copy of this software and associated documentation |
29 | 29 |
30 #include "HttpEnumerations.h" | 30 #include "HttpEnumerations.h" |
31 | 31 |
32 #include <string> | 32 #include <string> |
33 | 33 |
34 namespace Palanthir | 34 namespace Orthanc |
35 { | 35 { |
36 class HttpException | 36 class HttpException |
37 { | 37 { |
38 private: | 38 private: |
39 Palanthir_HttpStatus status_; | 39 Orthanc_HttpStatus status_; |
40 std::string custom_; | 40 std::string custom_; |
41 | 41 |
42 public: | 42 public: |
43 static const char* GetDescription(Palanthir_HttpStatus status); | 43 static const char* GetDescription(Orthanc_HttpStatus status); |
44 | 44 |
45 HttpException(const std::string& custom) | 45 HttpException(const std::string& custom) |
46 { | 46 { |
47 status_ = Palanthir_HttpStatus_None; | 47 status_ = Orthanc_HttpStatus_None; |
48 custom_ = custom; | 48 custom_ = custom; |
49 } | 49 } |
50 | 50 |
51 HttpException(Palanthir_HttpStatus status) | 51 HttpException(Orthanc_HttpStatus status) |
52 { | 52 { |
53 status_ = status; | 53 status_ = status; |
54 } | 54 } |
55 | 55 |
56 Palanthir_HttpStatus GetHttpStatus() const | 56 Orthanc_HttpStatus GetHttpStatus() const |
57 { | 57 { |
58 return status_; | 58 return status_; |
59 } | 59 } |
60 | 60 |
61 const char* What() const; | 61 const char* What() const; |