Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4306 → Rev 4307

/branches/network/uspace/srv/net/err.h
39,6 → 39,12
 
#include <errno.h>
 
#ifdef CONFIG_DEBUG
 
#include <stdio.h>
 
#endif
 
/** An actual stored error code.
*/
#define ERROR_CODE error_check_return_value
58,9 → 64,17
/** 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.
*/
#ifdef CONFIG_DEBUG
 
#define ERROR_PROPAGATE( value ) if( ERROR_OCCURRED( value )){ printf( "error at %s:%d %d\n", __FILE__, __LINE__, ERROR_CODE ); return ERROR_CODE; }
 
#else
 
#define ERROR_PROPAGATE( value ) if( ERROR_OCCURRED( value )) return ERROR_CODE
 
#endif
 
#endif
 
/** @}
*/