NEST  2.6.0,not_revisioned_source_dir@0
librandom_exceptions.h
Go to the documentation of this file.
1 /*
2  * librandom_exceptions.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef LIBRANDOM_EXCEPTIONS_H
24 #define LIBRANDOM_EXCEPTIONS_H
25 
26 #include "sliexceptions.h"
27 
28 namespace librandom {
29 
34  class MissingRNG: public SLIException
35  {
36  std::string msg_;
37 
38  public:
39 
42  : SLIException("MissingRNG"),
43  msg_()
44  {}
45 
46  MissingRNG(std::string msg)
47  : SLIException("MissingRNG"),
48  msg_(msg)
49  {}
50 
51  ~MissingRNG() throw () {}
52 
53  std::string message() { return msg_; }
54  };
55 
61  {
62  std::string msg_;
63 
64  public:
65 
68  : SLIException("UnsuitableRNG"),
69  msg_()
70  {}
71 
72  UnsuitableRNG(std::string msg)
73  : SLIException("UnsuitableRNG"),
74  msg_(msg)
75  {}
76 
77  ~UnsuitableRNG() throw () {}
78 
79  std::string message() { return msg_; }
80  };
81 
82 }
83 
84 
85 
86 
87 #endif
MissingRNG(std::string msg)
Definition: librandom_exceptions.h:46
~UnsuitableRNG()
Definition: librandom_exceptions.h:77
std::string message()
Returns a diagnostic message or empty string.
Definition: librandom_exceptions.h:53
Exception to be thrown if no (suitable) RNG is available.
Definition: librandom_exceptions.h:34
std::string message()
Returns a diagnostic message or empty string.
Definition: librandom_exceptions.h:79
MissingRNG()
Definition: librandom_exceptions.h:41
UnsuitableRNG()
Definition: librandom_exceptions.h:67
Exception to be thrown if no (suitable) RNG is available.
Definition: librandom_exceptions.h:60
std::string msg_
Definition: librandom_exceptions.h:62
Base class for all SLI exceptions.
Definition: sliexceptions.h:56
~MissingRNG()
Definition: librandom_exceptions.h:51
std::string msg_
Definition: librandom_exceptions.h:36
UnsuitableRNG(std::string msg)
Definition: librandom_exceptions.h:72