Skip to content

ECSOptions.OnExceptionSwallowed Property

Definition

Namespace: Brine2D.ECS

Optional callback invoked when an exception is swallowed because PropagateExceptions is false. Use this to route errors to a crash reporter or telemetry service in release builds without forcing the exception to propagate and crash the game loop.

C#
public System.Action<System.Exception,string>? OnExceptionSwallowed { get; set; }

Property Value

System.Action<System.Exception,System.String>

Remarks

The callback receives the exception and a context string describing where the exception originated \(e\.g\., system type name or behavior type name \+ entity name\). The callback itself must not throw; any exception it raises is silently ignored.