From 579c3ac445043122b0a702bdb2542d9ea404b62e Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 26 Jul 2006 19:16:58 +0000 Subject: Exceptions have been re-worked, and are easier to use, and don't collide with system includues anymore. --- src/exceptionbase.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/exceptionbase.cpp') diff --git a/src/exceptionbase.cpp b/src/exceptionbase.cpp index 3cde134..a9b9820 100644 --- a/src/exceptionbase.cpp +++ b/src/exceptionbase.cpp @@ -1,7 +1,7 @@ -#include "exception.h" +#include "exceptionbase.h" #include -Exception::Exception( const char *lpFormat, ... ) throw() : +ExceptionBase::ExceptionBase( const char *lpFormat, ... ) throw() : nErrorCode( 0 ), sWhat( NULL ) { @@ -12,7 +12,7 @@ Exception::Exception( const char *lpFormat, ... ) throw() : va_end(ap); } -Exception::Exception( int nCode, const char *lpFormat, ... ) throw() : +ExceptionBase::ExceptionBase( int nCode, const char *lpFormat, ... ) throw() : nErrorCode( nCode ), sWhat( NULL ) { @@ -23,13 +23,13 @@ Exception::Exception( int nCode, const char *lpFormat, ... ) throw() : va_end(ap); } -Exception::Exception( int nCode ) throw() : +ExceptionBase::ExceptionBase( int nCode ) throw() : nErrorCode( nCode ), sWhat( NULL ) { } -Exception::~Exception() throw() +ExceptionBase::~ExceptionBase() throw() { if( sWhat ) { @@ -38,7 +38,7 @@ Exception::~Exception() throw() } } -void Exception::setWhat( const char *lpFormat, va_list &vargs ) +void ExceptionBase::setWhat( const char *lpFormat, va_list &vargs ) { if( sWhat ) delete[] sWhat; int nSize; @@ -48,12 +48,12 @@ void Exception::setWhat( const char *lpFormat, va_list &vargs ) vsnprintf( sWhat, nSize+1, lpFormat, vargs ); } -const char *Exception::what() const throw() +const char *ExceptionBase::what() const throw() { return sWhat; } -int Exception::getErrorCode() +int ExceptionBase::getErrorCode() { return nErrorCode; } -- cgit v1.2.3