From ec05778d5718a7912e506764d443a78d6a6179e3 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Nov 2012 22:41:51 +0000 Subject: Converted tabs to spaces with tabconv. --- src/stable/exceptionbase.h | 304 ++++++++++++++++++++++----------------------- 1 file changed, 152 insertions(+), 152 deletions(-) (limited to 'src/stable/exceptionbase.h') diff --git a/src/stable/exceptionbase.h b/src/stable/exceptionbase.h index 9e6c72d..8f651b7 100644 --- a/src/stable/exceptionbase.h +++ b/src/stable/exceptionbase.h @@ -18,173 +18,173 @@ namespace Bu { - /** - * A generalized Exception base class. This is nice for making general and - * flexible child classes that can create new error code classes. - * - * In order to create your own exception class use these two lines. - * - * in your header: subExceptionDecl( NewClassName ); - * - * in your source: subExcpetienDef( NewClassName ); - */ - class ExceptionBase : public std::exception - { - public: - /** - * Construct an exception with an error code of zero, but with a - * description. The use of this is not reccomended most of the time, - * it's generally best to include an error code with the exception so - * your program can handle the exception in a better way. - * @param sFormat The format of the text. See printf for more info. - */ - ExceptionBase( const char *sFormat, ... ) throw(); - - /** - * - * @param nCode - * @param sFormat - */ - ExceptionBase( int nCode, const char *sFormat, ... ) throw(); - - /** - * - * @param nCode - * @return - */ - ExceptionBase( int nCode=0 ) throw(); - - ExceptionBase( const ExceptionBase &e ) throw (); - - /** - * - * @return - */ - virtual ~ExceptionBase() throw(); - - /** - * - * @return - */ - virtual const char *what() const throw(); - - /** - * - * @return - */ - int getErrorCode(); - - /** - * - * @param lpFormat - * @param vargs - */ - void setWhat( const char *lpFormat, va_list &vargs ); - - /** - * - * @param lpText - */ - void setWhat( const char *lpText ); - - private: - int nErrorCode; /**< The code for the error that occured. */ - char *sWhat; /**< The text string telling people what went wrong. */ - }; + /** + * A generalized Exception base class. This is nice for making general and + * flexible child classes that can create new error code classes. + * + * In order to create your own exception class use these two lines. + * + * in your header: subExceptionDecl( NewClassName ); + * + * in your source: subExcpetienDef( NewClassName ); + */ + class ExceptionBase : public std::exception + { + public: + /** + * Construct an exception with an error code of zero, but with a + * description. The use of this is not reccomended most of the time, + * it's generally best to include an error code with the exception so + * your program can handle the exception in a better way. + * @param sFormat The format of the text. See printf for more info. + */ + ExceptionBase( const char *sFormat, ... ) throw(); + + /** + * + * @param nCode + * @param sFormat + */ + ExceptionBase( int nCode, const char *sFormat, ... ) throw(); + + /** + * + * @param nCode + * @return + */ + ExceptionBase( int nCode=0 ) throw(); + + ExceptionBase( const ExceptionBase &e ) throw (); + + /** + * + * @return + */ + virtual ~ExceptionBase() throw(); + + /** + * + * @return + */ + virtual const char *what() const throw(); + + /** + * + * @return + */ + int getErrorCode(); + + /** + * + * @param lpFormat + * @param vargs + */ + void setWhat( const char *lpFormat, va_list &vargs ); + + /** + * + * @param lpText + */ + void setWhat( const char *lpText ); + + private: + int nErrorCode; /**< The code for the error that occured. */ + char *sWhat; /**< The text string telling people what went wrong. */ + }; } -#define subExceptionDecl( name ) \ -class name : public Bu::ExceptionBase \ -{ \ - public: \ - name( const char *sFormat, ... ) throw (); \ - name( int nCode, const char *sFormat, ... ) throw(); \ - name( int nCode=0 ) throw (); \ - name( const name &e ) throw (); \ +#define subExceptionDecl( name ) \ +class name : public Bu::ExceptionBase \ +{ \ + public: \ + name( const char *sFormat, ... ) throw (); \ + name( int nCode, const char *sFormat, ... ) throw(); \ + name( int nCode=0 ) throw (); \ + name( const name &e ) throw (); \ }; -#define subExceptionDeclChild( name, parent ) \ -class name : public parent \ -{ \ - public: \ - name( const char *sFormat, ... ) throw (); \ - name( int nCode, const char *sFormat, ... ) throw(); \ - name( int nCode=0 ) throw (); \ - name( const name &e ) throw (); \ +#define subExceptionDeclChild( name, parent ) \ +class name : public parent \ +{ \ + public: \ + name( const char *sFormat, ... ) throw (); \ + name( int nCode, const char *sFormat, ... ) throw(); \ + name( int nCode=0 ) throw (); \ + name( const name &e ) throw (); \ }; -#define subExceptionDeclBegin( name ) \ -class name : public Bu::ExceptionBase \ -{ \ - public: \ - name( const char *sFormat, ... ) throw (); \ - name( int nCode, const char *sFormat, ... ) throw(); \ - name( int nCode=0 ) throw (); \ - name( const name &e ) throw (); +#define subExceptionDeclBegin( name ) \ +class name : public Bu::ExceptionBase \ +{ \ + public: \ + name( const char *sFormat, ... ) throw (); \ + name( int nCode, const char *sFormat, ... ) throw(); \ + name( int nCode=0 ) throw (); \ + name( const name &e ) throw (); -#define subExceptionDeclEnd() \ +#define subExceptionDeclEnd() \ }; -#define subExceptionDef( name ) \ -name::name( const char *lpFormat, ... ) throw() : \ - ExceptionBase( 0 ) \ -{ \ - va_list ap; \ - va_start( ap, lpFormat ); \ - setWhat( lpFormat, ap ); \ - va_end( ap ); \ -} \ -name::name( int nCode, const char *lpFormat, ... ) throw() : \ - ExceptionBase( nCode ) \ -{ \ - va_list ap; \ - va_start( ap, lpFormat ); \ - setWhat( lpFormat, ap ); \ - va_end( ap ); \ -} \ -name::name( int nCode ) throw() : \ - ExceptionBase( nCode ) \ -{ \ -} \ -name::name( const name &e ) throw() : \ - ExceptionBase( e ) \ -{ \ +#define subExceptionDef( name ) \ +name::name( const char *lpFormat, ... ) throw() : \ + ExceptionBase( 0 ) \ +{ \ + va_list ap; \ + va_start( ap, lpFormat ); \ + setWhat( lpFormat, ap ); \ + va_end( ap ); \ +} \ +name::name( int nCode, const char *lpFormat, ... ) throw() : \ + ExceptionBase( nCode ) \ +{ \ + va_list ap; \ + va_start( ap, lpFormat ); \ + setWhat( lpFormat, ap ); \ + va_end( ap ); \ +} \ +name::name( int nCode ) throw() : \ + ExceptionBase( nCode ) \ +{ \ +} \ +name::name( const name &e ) throw() : \ + ExceptionBase( e ) \ +{ \ } -#define subExceptionDefChild( name, parent ) \ -name::name( const char *lpFormat, ... ) throw() : \ - parent( 0 ) \ -{ \ - va_list ap; \ - va_start( ap, lpFormat ); \ - setWhat( lpFormat, ap ); \ - va_end( ap ); \ -} \ -name::name( int nCode, const char *lpFormat, ... ) throw() : \ - parent( nCode ) \ -{ \ - va_list ap; \ - va_start( ap, lpFormat ); \ - setWhat( lpFormat, ap ); \ - va_end( ap ); \ -} \ -name::name( int nCode ) throw() : \ - parent( nCode ) \ -{ \ -} \ -name::name( const name &e ) throw() : \ - ExceptionBase( e ) \ -{ \ +#define subExceptionDefChild( name, parent ) \ +name::name( const char *lpFormat, ... ) throw() : \ + parent( 0 ) \ +{ \ + va_list ap; \ + va_start( ap, lpFormat ); \ + setWhat( lpFormat, ap ); \ + va_end( ap ); \ +} \ +name::name( int nCode, const char *lpFormat, ... ) throw() : \ + parent( nCode ) \ +{ \ + va_list ap; \ + va_start( ap, lpFormat ); \ + setWhat( lpFormat, ap ); \ + va_end( ap ); \ +} \ +name::name( int nCode ) throw() : \ + parent( nCode ) \ +{ \ +} \ +name::name( const name &e ) throw() : \ + ExceptionBase( e ) \ +{ \ } namespace Bu { - // Exceptions that are so general they could be used anywhere go here. - class UnsupportedException : public Bu::ExceptionBase - { - public: - UnsupportedException() throw (); - }; + // Exceptions that are so general they could be used anywhere go here. + class UnsupportedException : public Bu::ExceptionBase + { + public: + UnsupportedException() throw (); + }; } #endif -- cgit v1.2.3