# Hurricane VLSI Database

Error.h
1
2 // -*- C++ -*-
3 //
4 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
5 //
6 // This file is part of Hurricane.
7 //
8 // Hurricane is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Lesser General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
12 //
13 // Hurricane is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-
15 // TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the Lesser GNU General Public
19 // License along with Hurricane. If not, see
20 // <http://www.gnu.org/licenses/>.
21 //
22 // +-----------------------------------------------------------------+
23 // | H U R R I C A N E |
24 // | V L S I B a c k e n d D a t a - B a s e |
25 // | |
26 // | Author : Remy Escassut |
27 // | E-mail : Jean-Paul.Chaput@lip6.fr |
28 // | =============================================================== |
29 // | C++ Header : "./hurricane/Error.h" |
30 // +-----------------------------------------------------------------+
31
32
33 #ifndef HURRICANE_ERROR_H
34 #define HURRICANE_ERROR_H
35
36 #include "hurricane/Exception.h"
37 #include "hurricane/Backtrace.h"
38
39
40 namespace Hurricane {
41
42
43 class Error : public Exception {
44 public:
45 Error ( const string& reason );
46 Error ( const char* format, ... );
47 Error ( int code, const string& reason );
48 Error ( int code, const char* format, ... );
49 Error ( const Error& error );
50 inline string getReason () const;
51 inline int getCode () const;
52 inline string where () const;
53 inline string textWhere () const;
54 inline string htmlWhere () const;
55 virtual string _getTypeName () const;
56 virtual string _getString () const;
57 private:
58 string _reason;
59 int _code;
60 Backtrace _backtrace;
61 };
62
63
64 // Inline Functions.
65 inline string Error::getReason () const { return _reason; }
66 inline int Error::getCode () const { return _code; }
67 inline string Error::where () const { return _backtrace.where(); }
68 inline string Error::textWhere () const { return _backtrace.textWhere(); }
69 inline string Error::htmlWhere () const { return _backtrace.htmlWhere(); }
70
71
72 } // Hurricane namespace.
73
74
75 GETSTRING_POINTER_SUPPORT(Hurricane::Error);
76 GETSTRING_VALUE_SUPPORT(Hurricane::Error);
77 IOSTREAM_POINTER_SUPPORT(Hurricane::Error);
78 IOSTREAM_VALUE_SUPPORT(Hurricane::Error);
79
80
81 #endif // HURRICANE_ERROR_H
Hurricane::Error::textWhere
string textWhere() const
Definition: Error.h:68
Hurricane::Error
Error description (API)
Definition: Error.h:43
Hurricane::Error::getCode
int getCode() const
Definition: Error.h:66
Hurricane::Error::Error
Error(const string &reason)
Hurricane::Exception
Exception description (API)
Definition: Exception.h:34
Hurricane::Error::getReason
string getReason() const
Definition: Error.h:65
Hurricane::Error::htmlWhere
string htmlWhere() const
Definition: Error.h:69
Hurricane
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5

Generated by doxygen 1.8.14 on Tue Jul 21 2020 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved