|
World Ocean Simulation System (WOSS) library
|
Exception thrown by the Woss test framework. More...
#include <woss-test.h>


Public Member Functions | |
| WossException (WossErrorType error_type_, const char *file_, int line_, const char *func_, const char *info_) | |
| WossException (const WossException ©)=default | |
| virtual | ~WossException () override throw () =default |
| WossException & | operator= (const WossException ©)=default |
| virtual const char * | what () const throw () |
| WossErrorType | getErrorType () const |
| const char * | getFile () const |
| int | getLine () const |
| const char * | getFunc () const |
| const char * | getInfo () const |
Static Public Member Functions | |
| static void | printAndExit (const std::exception *e) |
Static Public Attributes | |
| static constexpr int | CHAR_ARR_LENGTH = 250 |
Protected Attributes | |
| WossErrorType | error_type |
| char | file [CHAR_ARR_LENGTH] |
| int | line |
| char | func [CHAR_ARR_LENGTH] |
| char | info [CHAR_ARR_LENGTH] |
| char | what_str [4 *CHAR_ARR_LENGTH] |
Exception thrown by the Woss test framework.
WossException class stores the file, the line and the type of the thrown exception
| WossException::WossException | ( | WossErrorType | error_type_, |
| const char * | file_, | ||
| int | line_, | ||
| const char * | func_, | ||
| const char * | info_ | ||
| ) |
WossException constructor
| error_type_ | error type |
| file_ | file where the exception has been thrown |
| line_ | line where the exception has been thrown |
| func_ | function name where the exception has been thrown |
| info_ | additional info c string |
|
default |
copy constructor
|
overridevirtualdefault | |||||||||||||
destructor
|
inline |
Get current error type
References error_type.
Referenced by printAndExit().
|
inline |
|
inline |
|
inline |
|
inline |
|
default |
assignement operator
| copy | the source copy |
|
static |
Function that print the current exception and exit the test
| e | input exception |
References getErrorType(), and woss::WOSS_ERROR_UNEXPECTED_EXCEPTION.
Referenced by woss::WossTest::run().

|
virtual | |||||||||||||
|
inlinestaticconstexpr |
Max length of all char arrays
|
protected |
current error type
Referenced by getErrorType(), and what().
|
protected |
current file c string
Referenced by getFile(), what(), and WossException().
|
protected |
current function c string
Referenced by getFunc(), what(), and WossException().
|
protected |
current info c string
Referenced by getInfo(), what(), and WossException().
|
protected |
current what c string
Referenced by what().