Errors are reported to the user via the MHA_Error exception.
More...
|
#define | MHA_ErrorMsg(x) MHA_Error(__FILE__,__LINE__,"%s",x) |
| Throw an openMHA error with a text message. More...
|
|
#define | MHA_assert(x) if(!(x)) throw MHA_Error(__FILE__,__LINE__,"\"%s\" is false.",#x) |
| Assertion macro, which throws an MHA_Error. More...
|
|
#define | MHA_assert_equal(a, b) if( a != b ) throw MHA_Error(__FILE__,__LINE__,"\"%s == %s\" is false (%s = %g, %s = %g).",#a,#b,#a,(double)(a),#b,(double)(b)) |
| Equality assertion macro, which throws an MHA_Error with the values. More...
|
|
|
void | mha_debug (const char *fmt,...) __attribute__((__format__(printf |
| Print an info message (stderr on Linux, OutputDebugString in Windows). More...
|
|
Errors are reported to the user via the MHA_Error exception.
◆ MHA_ErrorMsg
#define MHA_ErrorMsg |
( |
|
x | ) |
MHA_Error(__FILE__,__LINE__,"%s",x) |
Throw an openMHA error with a text message.
- Parameters
-
◆ MHA_assert
#define MHA_assert |
( |
|
x | ) |
if(!(x)) throw MHA_Error(__FILE__,__LINE__,"\"%s\" is false.",#x) |
Assertion macro, which throws an MHA_Error.
- Parameters
-
x | Boolean expression which should be true. |
◆ MHA_assert_equal
#define MHA_assert_equal |
( |
|
a, |
|
|
|
b |
|
) |
| if( a != b ) throw MHA_Error(__FILE__,__LINE__,"\"%s == %s\" is false (%s = %g, %s = %g).",#a,#b,#a,(double)(a),#b,(double)(b)) |
Equality assertion macro, which throws an MHA_Error with the values.
- Parameters
-
a | Numeric expression which can be converted to double (for printing). |
b | Numeric expression which should be equal to a |
◆ mha_debug()
void mha_debug |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
Print an info message (stderr on Linux, OutputDebugString in Windows).