1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-21 09:27:59 +02:00

Fleshing out comptime debugging

This commit is contained in:
Brian Fiete 2022-03-15 16:33:30 -07:00
parent ff2e40e3bf
commit b334423106
28 changed files with 2079 additions and 780 deletions

View file

@ -406,6 +406,9 @@ namespace System
public static void AddErrorHandler(ErrorHandler handler)
{
if (Compiler.IsComptime)
return;
using (sMonitor.Val.Enter())
{
if (sErrorHandlers == null)
@ -416,6 +419,9 @@ namespace System
public static Result<void> RemoveErrorHandler(ErrorHandler handler)
{
if (Compiler.IsComptime)
return .Ok;
using (sMonitor.Val.Enter())
{
if (sErrorHandlers.RemoveStrict(handler))
@ -426,6 +432,9 @@ namespace System
public static ErrorHandlerResult CheckErrorHandlers(Error error)
{
if (Compiler.IsComptime)
return .ContinueFailure;
using (sMonitor.Val.Enter())
{
if (sInsideErrorHandler)