9 class StirException :
public std::exception
12 StirException(
const char* reason,
const char* file,
int line)
14 size_t len = strlen(reason) + 1;
15 _reason =
new char[len];
16 memcpy(_reason, reason, len);
17 len = strlen(file) + 1;
18 _file =
new char[len];
19 memcpy(_file, file, len);
22 virtual ~StirException() throw()
27 virtual const char* what()
const throw() {
return _reason; }
28 const char* file()
const throw() {
return _file; }
29 int line()
const throw() {
return _line; }