BRL-CAD
brep_except.h
Go to the documentation of this file.
1 /* B R E P _ E X C E P T . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 
21 #ifndef BREP_EXCEPT_H
22 #define BREP_EXCEPT_H
23 
24 #include "common.h"
25 
26 #include <stdexcept>
27 
28 class InvalidBooleanOperation : public std::invalid_argument
29 {
30 public:
31  InvalidBooleanOperation(const std::string &msg = "") : std::invalid_argument(msg) {}
32 };
33 
34 class InvalidGeometry : public std::invalid_argument
35 {
36 public:
37  InvalidGeometry(const std::string &msg = "") : std::invalid_argument(msg) {}
38 };
39 
40 class AlgorithmError : public std::runtime_error
41 {
42 public:
43  AlgorithmError(const std::string &msg = "") : std::runtime_error(msg) {}
44 };
45 
46 class GeometryGenerationError : public std::runtime_error
47 {
48 public:
49  GeometryGenerationError(const std::string &msg = "") : std::runtime_error(msg) {}
50 };
51 
52 class IntervalGenerationError : public std::runtime_error
53 {
54 public:
55  IntervalGenerationError(const std::string &msg = "") : std::runtime_error(msg) {}
56 };
57 
58 class InvalidInterval : public std::runtime_error
59 {
60 public:
61  InvalidInterval(const std::string &msg = "") : std::runtime_error(msg) {}
62 };
63 
64 #endif
65 
66 /*
67  * Local Variables:
68  * tab-width: 8
69  * mode: C
70  * indent-tabs-mode: t
71  * c-file-style: "stroustrup"
72  * End:
73  * ex: shiftwidth=4 tabstop=8
74  */
InvalidGeometry(const std::string &msg="")
Definition: brep_except.h:37
IntervalGenerationError(const std::string &msg="")
Definition: brep_except.h:55
Header file for the BRL-CAD common definitions.
InvalidBooleanOperation(const std::string &msg="")
Definition: brep_except.h:31
GeometryGenerationError(const std::string &msg="")
Definition: brep_except.h:49
InvalidInterval(const std::string &msg="")
Definition: brep_except.h:61
AlgorithmError(const std::string &msg="")
Definition: brep_except.h:43