Debian Codegraph @

src/gengine/BaseException.cpp

raw
1 /*
2 * Copyright (C) 2004 Ivo Danihelka ([email protected])
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 */
9 #include "BaseException.h"
10
11 #include <string>
12
13 //-----------------------------------------------------------------
14 /**
15 * Mother of all exception.
16 *
17 * @param exinfo detail info about problem
18 */
19 BaseException::BaseException(const ExInfo &exinfo)
20 : std::exception(), m_info(exinfo)
21 {
22 /* empty */
23 }
24 //-----------------------------------------------------------------
25 /**
26 * Return text info.
27 * @return text info, valid with exception live
28 */
29 const char *
30 BaseException::what() const throw()
31 {
32 return m_info.what();
33 }
34 //-----------------------------------------------------------------
35 /**
36 * Return detail info.
37 * @return detail info, valid with exception live
38 */
39 const ExInfo &
40 BaseException::info() const throw()
41 {
42 return m_info;
43 }