Skip to content
Snippets Groups Projects
Commit dcf74d48 authored by Francois Bleibel's avatar Francois Bleibel
Browse files

Made exceptions derive from std::exception

parent d2d769ef
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@
#include <iostream> /* Classe ostream. */
#include <string> /* Classe string. */
#include <sot-core/sot-core-api.h>
#include <exception>
// Uncomment this macros to have lines parameter on the throw display
......@@ -43,7 +44,7 @@ namespace sot {
/* \class ExceptionAbstract
*/
class SOT_CORE_EXPORT ExceptionAbstract
class SOT_CORE_EXPORT ExceptionAbstract : public std::exception
{
public:
......@@ -79,7 +80,7 @@ private:
public:
ExceptionAbstract( const int& code, const std::string & msg = "" );
virtual ~ExceptionAbstract( void ){}
virtual ~ExceptionAbstract( void ) throw() {}
/** Access to the error code. */
int getCode (void);
......@@ -91,6 +92,7 @@ public:
* Cannot be \e NULL.
*/
const char *getMessage (void);
const char* what () const throw ();
/** Print the error structure. */
......
......@@ -61,7 +61,7 @@ public:
const std::string & msg = "" );
ExceptionDynamic( const ExceptionDynamic::ErrorCodeEnum& errcode,
const std::string & msg,const char* format, ... );
virtual ~ExceptionDynamic( void ){}
virtual ~ExceptionDynamic( void ) throw() {}
};
......
......@@ -63,7 +63,7 @@ public:
const std::string & msg = "" );
ExceptionFactory ( const ExceptionFactory::ErrorCodeEnum& errcode,
const std::string & msg,const char* format, ... );
virtual ~ExceptionFactory( void ){}
virtual ~ExceptionFactory( void ) throw() {}
};
......
......@@ -58,7 +58,7 @@ public:
ExceptionFeature ( const ExceptionFeature::ErrorCodeEnum& errcode,
const std::string & msg,const char* format, ... );
virtual ~ExceptionFeature( void ){}
virtual ~ExceptionFeature( void ) throw() {}
};
......
......@@ -62,7 +62,7 @@ public:
const std::string & msg = "" );
ExceptionSignal( const ExceptionSignal::ErrorCodeEnum& errcode,
const std::string & msg,const char* format, ... );
virtual ~ExceptionSignal( void ){}
virtual ~ExceptionSignal( void ) throw() {}
};
......
......@@ -59,7 +59,7 @@ public:
const std::string & msg = "" );
ExceptionTask( const ExceptionTask::ErrorCodeEnum& errcode,
const std::string & msg,const char* format, ... );
virtual ~ExceptionTask( void ){}
virtual ~ExceptionTask( void ) throw() {}
};
......
......@@ -58,7 +58,7 @@ public:
const std::string & msg = "" );
ExceptionTools( const ExceptionTools::ErrorCodeEnum& errcode,
const std::string & msg,const char* format, ... );
virtual ~ExceptionTools( void ){}
virtual ~ExceptionTools( void ) throw() {}
};
......
......@@ -66,6 +66,10 @@ getCode (void)
return this->code;
}
const char* ExceptionAbstract::what() const throw() {
return message.c_str();
}
/* ------------------------------------------------------------------------- */
/* --- MODIFIORS ----------------------------------------------------------- */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment