MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Enumerations | Functions
Fail.h File Reference
#include "FailPlatformSpecific.h"
#include "FailCodes.h"

Go to the source code of this file.

Macros

#define XX(a)   MFM_FAIL_CODE_REASON_##a,
 
#define MFM_API_ASSERT(expr, code)   do { if (!(expr)) FAIL(code); } while (0)
 
#define MFM_API_ASSERT_NONNULL(expr)   MFM_API_ASSERT(expr,NULL_POINTER)
 
#define MFM_API_ASSERT_ZERO(expr)   MFM_API_ASSERT((expr)==0,NON_ZERO)
 

Enumerations

enum  MFMFailureCodes { ZERO_UNUSED = 0, MAX_FAILURE }
 

Functions

const char * MFMFailCodeReason (int failCode)
 

Detailed Description

Support for meaningful runtime deaths when necessary

Author
David H. Ackley.
Date
(C) 2014 All rights reserved.
Code License:
LGPL
License Note:
All code samples shown in documentation are placed into the public domain.

Function Documentation

const char* MFMFailCodeReason ( int  failCode)

Convert a failure code into a null-terminated string for printing. If failCode is negative or greater than the number of known failure codes, returns "[failCode out of range]", otherwise returns the failure code symbol itself as a string.