Debian Codegraph @

CodeLite/cl_exception.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2013 by Eran Ifrah
5 // file name : cl_exception.h
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25
26 #ifndef CLEXCEPTION_H
27 #define CLEXCEPTION_H
28
29 #include <wx/string.h>
30 #include "codelite_exports.h"
31
32 class WXDLLIMPEXP_CL clException
33 {
34 wxString m_message;
35 int m_errorCode;
36 public:
37 clException(const wxString& message) : m_message(message), m_errorCode(0) {}
38 clException(const wxString& message, int errorCode) : m_message(message), m_errorCode(errorCode) {}
39 virtual ~clException() {}
40
41 const wxString& What() const {
42 return m_message;
43 }
44 int ErrorCode() const {
45 return m_errorCode;
46 }
47 };
48
49 #endif // CLEXCEPTION_H