summaryrefslogtreecommitdiff
path: root/ext/dsent/libutil/Exception.h
blob: 88d68cce2fc46f24e50a8f58ae7ec761bf9995b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef __EXCEPTION_H__
#define __EXCEPTION_H__

#include <exception>

#include "String.h"

namespace LibUtil
{
    using std::exception;

    // Exception class handles the all exception messages in the program
    class Exception : public exception
    {
        public:
            // All constructors/destructors/functions in this class don't throw any events
            Exception(const String& exception_msg_) throw();
            ~Exception() throw();

            // Derived from std::exception class that returns a null-terminated char string
            const char* what() const throw();

        private:
            String mExceptionMsg;
    };
}

#endif // __EXCEPTION_H__