Doxygen Generated Documentation of Ben-Jose Trainable SAT Solver Library
top_exception.h
1 
2 
3 /*************************************************************
4 
5 This file is part of ben-jose.
6 
7 ben-jose is free software: you can redistribute it and/or modify
8 it under the terms of the version 3 of the GNU General Public
9 License as published by the Free Software Foundation.
10 
11 ben-jose is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with ben-jose. If not, see <http://www.gnu.org/licenses/>.
18 
19 ------------------------------------------------------------
20 
21 Copyright (C) 2007-2012, 2014-2016. QUIROGA BELTRAN, Jose Luis.
22 Id (cedula): 79523732 de Bogota - Colombia.
23 See https://github.com/joseluisquiroga/ben-jose
24 
25 ben-jose is free software thanks to The Glory of Our Lord
26  Yashua Melej Hamashiaj.
27 Our Resurrected and Living, both in Body and Spirit,
28  Prince of Peace.
29 
30 ------------------------------------------------------------
31 
32 top_exception.h
33 
34 Top exception class.
35 
36 --------------------------------------------------------------*/
37 
38 
39 #ifndef TOP_EXCEPTION_H
40 #define TOP_EXCEPTION_H
41 
42 #include "platform.h"
43 #include "ch_string.h"
44 
45 #define as_pt_char(the_str) (const_cast<char *>(the_str))
46 
47 void abort_func(long val, const char* msg = as_pt_char("Aborting."));
48 
49 class top_exception {
50 private:
51  top_exception& operator = (top_exception& other){
52  abort_func(0);
53  return (*this);
54  }
55 
56 public:
57  long ex_id;
58  ch_string ex_stk;
59  ch_string ex_assrt;
60 
61  top_exception(long the_id = 0, ch_string assrt_str = "");
62 
63  ~top_exception(){
64  }
65 };
66 
67 #endif // TOP_EXCEPTION_H
68 
69