code/WPILib/ErrorBase.cpp
/**
 * @brief Set the current error information associated with this sensor.
 * 
 * @param code The error code
 * @param filename Filename of the error source
 * @param lineNumber Line number of the error source
 */
@brief Set the current error information associated with this sensor.

@param code The error code
@param filename Filename of the error source
@param lineNumber Line number of the error source
@brief Set the current error information associated with this sensor . @param code The error code @param filename Filename of the error source @param lineNumber Line number of the error source
void ErrorBase::SetError(Error::Code code, const char* filename, UINT32 lineNumber) const
{
    if (code != 0) {
        error.Set(code, filename, lineNumber, this);
        CRITICAL_REGION(globalErrorMutex);
        if (globalError.GetCode() == 0) {
            globalError = error;
        }
        END_REGION
    }
}
void ErrorBase :: SetError ( Error :: Code code , const char * filename , UINT32 lineNumber ) const { if ( code != 0 ) { error . Set ( code , filename , lineNumber , this ) ; CRITICAL_REGION ( globalErrorMutex ) ; if ( globalError . GetCode ( ) == 0 ) { globalError = error ; } END_REGION } }
@brief Set the current error information associated with this sensor.
@brief Set the current error information associated with this sensor .
//  If there was an error //  Set the current error information for this object. // Update the global error if there is not one already set.