installErrorReporting function

Module @runic-artifex/views in @runic-artifex/views 0.23.0

function installErrorReporting(options?: ErrorReportingOptions): () => void;

Reports the page's uncaught errors, unhandled promise rejections and the errors the Views runtime catches to the .NET host, which logs them through ILogger in the category Runic.Application.Views.Page (event 1150). Reports are bounded and redacted before they leave the page: the message and stack are trimmed, URLs lose their query and fragment, and options.redact can remove more. At most maxReportsPerMinute reports go out per minute, and repeats of one error within the minute only count. Reports wait for the connection and go out once it uses client-errors/1; a host of an earlier release does not, and they are dropped. Errors still reach the console and onBridgeDiagnostic as before.

Returns

A function that removes the reporter. Installing again replaces the previous reporter.