Add line and file/function to ErrorCondition

Issue #178 new
Patryk Kubiak created an issue

Add some method to save FUNCTION name and LINE of failure in ErrorCondition.

For example:

oC_ErrorCode_t SomeFunction( int A )
{
     oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;

    if(ErrorCondition( A != 0 , oC_ErrorCode_ValueNotCorrect ))
    {
         Global       = A;
         errorCode = oC_ErrorCode_None;
    }

    return errorCode;
}

void main()
{ 
    SomeFunction(0);
}

// System logs / error stack:
SomeFunction:123: Condition failed - "value not correct"

Comments (1)

  1. Log in to comment