Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
SystemException.h
1 /*
2  * SystemException class interface
3  *
4  * This file is part of OTAWA
5  * Copyright (c) 2005-12, IRIT UPS.
6  *
7  * OTAWA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * OTAWA is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OTAWA; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef ELM_SYS_SYSTEM_EXCEPTION_H
22 #define ELM_SYS_SYSTEM_EXCEPTION_H
23 
24 #include <elm/string/String.h>
25 #include <elm/util/Exception.h>
26 
27 namespace elm { namespace sys {
28 
29 // SystemException class
30 class SystemException: public Exception {
31 public:
32  typedef enum error_t {
33  OK = 0,
39  } error_t;
40 
41 private:
42  error_t err;
43  String msg;
44 
45 public:
46  SystemException(error_t err, String msg);
47  SystemException(int code, String header);
48  inline error_t error(void) const { return err; }
49 
50  // Exception overload
51  String message() override;
52 };
53 
54 } } // elm::sys
55 
56 #endif // ELM_SYS_SYSTEM_EXCEPTION_H
57 
elm::sys::SystemException::error_t
error_t
Definition: SystemException.h:32
elm::sys::SystemException::SystemException
SystemException(error_t err, String msg)
Definition: system_SystemException.cpp:43
elm::io::err
sys::SystemOutStream & err
Definition: system_SystemIO.cpp:128
elm::Exception
Definition: Exception.h:29
elm::sys::SystemException::NO_ACCESS
@ NO_ACCESS
Definition: SystemException.h:34
elm::sys::SystemException::NO_MORE_RESOURCE
@ NO_MORE_RESOURCE
Definition: SystemException.h:35
elm::sys::SystemException::IO_ERROR
@ IO_ERROR
Definition: SystemException.h:37
elm
Definition: adapter.h:26
elm::sys::SystemException::OK
@ OK
Definition: SystemException.h:33
elm::sys::SystemException::ALREADY_EXIST
@ ALREADY_EXIST
Definition: SystemException.h:38
elm::sys::SystemException::message
String message() override
Definition: system_SystemException.cpp:107
elm::sys::SystemException::error
error_t error(void) const
Definition: SystemException.h:48
elm::String
Definition: String.h:30
elm::sys::SystemException
Definition: SystemException.h:30
elm::sys::SystemException::BAD_PATH
@ BAD_PATH
Definition: SystemException.h:36