1,5 → 1,5 |
/* |
* Copyright (c) 2008 Lukas Mejdrech |
* Copyright (c) 2009 Lukas Mejdrech |
* All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
48,17 → 48,17 |
*/ |
#define ERROR_DECLARE int ERROR_CODE |
|
/** Stores the value as an error code and checks if an error occured. |
/** Stores the value as an error code and checks if an error occurred. |
* @param value The value to be checked. May be a function call. Input parameter. |
* @returns FALSE if the value indicates success (EOK). |
* @returns TRUE otherwise. |
*/ |
#define ERROR_OCCURED( value ) (( ERROR_CODE = ( value )) != EOK ) |
#define ERROR_OCCURRED( value ) (( ERROR_CODE = ( value )) != EOK ) |
|
/** Checks if an error occured and immediatelly exits the actual function returning the error code. |
/** Checks if an error occurred and immediately exits the actual function returning the error code. |
* @param value The value to be checked. May be a function call. Input parameter. |
*/ |
#define ERROR_PROPAGATE( value ) if( ERROR_OCCURED( value )) return ERROR_CODE |
#define ERROR_PROPAGATE( value ) if( ERROR_OCCURRED( value )) return ERROR_CODE |
|
#endif |
|