HoverRace  2.0
YamlExn.h
Go to the documentation of this file.
1 
2 // YamlExn.h
3 //
4 // Copyright (c) 2008, 2009, 2015 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 namespace HoverRace {
25 namespace Util {
26 namespace yaml {
27 
28 class YamlExn : public std::exception
29 {
30  using SUPER = std::exception;
31 
32 public:
33  YamlExn() : SUPER() { }
34  YamlExn(const char* const &msg) : SUPER(), msg(msg) { }
35  YamlExn(const std::string &msg) : SUPER(), msg(msg) { }
36  virtual ~YamlExn() noexcept { }
37 
38  const char* what() const noexcept override { return msg.c_str(); }
39 
40 private:
41  std::string msg;
42 };
43 
44 } // namespace yaml
45 } // namespace Util
46 } // namespace HoverRace
47 
std::exception SUPER
Definition: YamlExn.h:30
Definition: YamlExn.h:28
YamlExn()
Definition: YamlExn.h:33
std::string msg
Definition: YamlExn.h:41
YamlExn(const std::string &msg)
Definition: YamlExn.h:35
YamlExn(const char *const &msg)
Definition: YamlExn.h:34
virtual ~YamlExn() noexcept
Definition: YamlExn.h:36
Definition: Announcement.h:24
const char * what() const noexceptoverride
Definition: YamlExn.h:38