|
Nebula
|
The single place a plugin failure is reported.
A managed exception cannot cross the [UnmanagedCallersOnly] boundary. On Linux the runtime fails fast and the process goes with it, so everything the engine calls into the plugin has to be caught on this side, and this is where the report is made.
A property that throws keeps being called. The report says what failed and the rest of the frame runs. The same failure in every frame is the same failure, so a signature is reported the first time it is seen and then once every RepeatEvery times.
The counters are here for a test to read. The report itself goes to the engine's log, and this side has no way to read it back.
Static Public Member Functions | |
| static void | Report (string context, Exception exception) |
| Reports a plugin exception from a guarded call. | |
| static void | Report (object owner, string operation, Exception exception) |
| Reports a plugin exception from a guarded call on a plugin object. | |
| static void | ReportAssert (string expression, string file, int line, string member, string message, string stack) |
| Reports a managed assertion that failed, with the call site the compiler put into the assembly. | |
Properties | |
| static int | ReportCount [get, private set] |
| static string | LastContext [get, private set] |
| static string | LastMessage [get, private set] |
Static Private Member Functions | |
| static bool | ShouldReport (string signature) |
| Whether this failure should be reported. | |
Static Private Attributes | |
| static readonly Dictionary< string, int > | seen = new Dictionary<string, int>() |
| const int | RepeatEvery = 300 |
|
inlinestatic |
Reports a plugin exception from a guarded call on a plugin object.
The owner is what the report names, because a plugin's type is the thing a developer recognizes.
|
inlinestatic |
Reports a plugin exception from a guarded call.
The context is the call site as this side knows it: the entry point, or the property's type and the method the guard ran.
|
inlinestatic |
Reports a managed assertion that failed, with the call site the compiler put into the assembly.
|
inlinestaticprivate |
Whether this failure should be reported.
The count is what makes a failure that happens every frame report once and then every RepeatEvery times.
|
staticprivate |
|
staticprivate |
|
staticgetprivate set |
|
staticgetprivate set |
|
staticgetprivate set |