Error handling

Error

Function Description
Diagnostics.ActivityId Returns an opaque identifier for the currently-running evaluation.
Diagnostics.Trace Writes a trace message, if tracing is enabled, and returns value.
Error.Record Returns a record containing fields “Reason”, “Message”, and “Detail” set to the provided values. The record can be used to raise or throw an error.
TraceLevel.Critical Returns 1, the value for Critical trace level.
TraceLevel.Error Returns 2, the value for Error trace level.
TraceLevel.Information Returns 4, the value for Information trace level.
TraceLevel.Verbose Returns 5, the value for Verbose trace level.
TraceLevel.Warning Returns 3, the value for Warning trace level.