Blame view

morfeusz/exceptions.hpp 550 Bytes
Michał Lenart authored
1
2
3
4
5
6
7
8
9
10
/* 
 * File:   exceptions.hpp
 * Author: mlenart
 *
 * Created on 22 styczeń 2014, 13:16
 */

#ifndef EXCEPTIONS_HPP
#define	EXCEPTIONS_HPP
Michał Lenart authored
11
12
13
#include <exception>
#include <string>
Michał Lenart authored
14
15
namespace morfeusz {
Michał Lenart authored
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class MorfeuszException : public std::exception {
public:

    MorfeuszException(const std::string& what) : msg(what.c_str()) {
    }

    virtual ~MorfeuszException() throw () {
    }

    virtual const char* what() const throw () {
        return this->msg.c_str();
    }
private:
    const std::string msg;
};
Michał Lenart authored
32
33
}
Michał Lenart authored
34
35
#endif	/* EXCEPTIONS_HPP */