From 9e27762c2b4c1baf5b2aff003fbc56236fd742e6 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 26 Jul 2006 19:09:50 +0000 Subject: Partial update, don't use this release... --- src/exception.cpp | 60 ------------------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 src/exception.cpp (limited to 'src/exception.cpp') diff --git a/src/exception.cpp b/src/exception.cpp deleted file mode 100644 index 3cde134..0000000 --- a/src/exception.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "exception.h" -#include - -Exception::Exception( const char *lpFormat, ... ) throw() : - nErrorCode( 0 ), - sWhat( NULL ) -{ - va_list ap; - - va_start(ap, lpFormat); - setWhat( lpFormat, ap ); - va_end(ap); -} - -Exception::Exception( int nCode, const char *lpFormat, ... ) throw() : - nErrorCode( nCode ), - sWhat( NULL ) -{ - va_list ap; - - va_start(ap, lpFormat); - setWhat( lpFormat, ap ); - va_end(ap); -} - -Exception::Exception( int nCode ) throw() : - nErrorCode( nCode ), - sWhat( NULL ) -{ -} - -Exception::~Exception() throw() -{ - if( sWhat ) - { - delete[] sWhat; - sWhat = NULL; - } -} - -void Exception::setWhat( const char *lpFormat, va_list &vargs ) -{ - if( sWhat ) delete[] sWhat; - int nSize; - - nSize = vsnprintf( NULL, 0, lpFormat, vargs ); - sWhat = new char[nSize+1]; - vsnprintf( sWhat, nSize+1, lpFormat, vargs ); -} - -const char *Exception::what() const throw() -{ - return sWhat; -} - -int Exception::getErrorCode() -{ - return nErrorCode; -} - -- cgit v1.2.3