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:
parent
ff2e40e3bf
commit
b334423106
28 changed files with 2079 additions and 780 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue