throw exception if debug for Log.exception(className, message, exception)

This commit is contained in:
弘韬 张 2021-01-06 17:42:46 +08:00
parent 2b9008840a
commit 6b597f7516

View file

@ -50,14 +50,18 @@ namespace Flow.Launcher.Infrastructure.Logger
return valid;
}
[MethodImpl(MethodImplOptions.Synchronized)]
public static void Exception(string className, string message, System.Exception exception, [CallerMemberName] string methodName = "")
{
#if DEBUG
throw exception;
#else
var classNameWithMethod = CheckClassAndMessageAndReturnFullClassWithMethod(className, message, methodName);
ExceptionInternal(classNameWithMethod, message, exception);
#endif
}
private static string CheckClassAndMessageAndReturnFullClassWithMethod(string className, string message,