public static AssertAndThrow ( bool Condition, string Error_Message, [ filePath = "", [ lineNumber, [ method = "" ) : void | ||
Condition | bool | |
Error_Message | string | |
filePath | [ | |
lineNumber | [ | |
method | [ | |
return | void |
public static void AssertAndThrow(bool Condition, string Error_Message, [CallerFilePath] string filePath = "", [CallerLineNumber] int lineNumber = 0, [CallerMemberNameAttribute] string method = "")
{
if (LogLevel > eTraceType.Critical)
return;
if (!Condition)
{
#if TRACE
Debug.Assert(false, Error_Message + Environment.NewLine);
TraceError(Error_Message, filePath: filePath, lineNumber: lineNumber, method: method);
#endif
throw new Exception(Error_Message);
}
}
DebugEx::AssertAndThrow ( string Error_Message, [ filePath = "", [ lineNumber, [ method = "" ) : void |