Autopysta
Loading...
Searching...
No Matches
Exception.h
1#ifndef EXCEPTION
2#define EXCEPTION
3
4#include <string.h>
5#include<exception>
6using namespace std;
7
21class Exception : public exception {
22public:
24
28 Exception(int c, const char* m);
29
31 int code();
32
34 const char* msg();
35
37 virtual const char* what() const throw();
38
39 ~Exception() {};
40
41 int _code;
42 char _msg[256];
43};
44
45#endif
Exception class for handling error's.
Definition Exception.h:21
char _msg[256]
Error message.
Definition Exception.h:42
const char * msg()
Returns the error message.
int code()
Returns the error code.
Exception(int c, const char *m)
Exception constructor.
virtual const char * what() const
Returns the error message with an exception specification.
int _code
Error code.
Definition Exception.h:41