Skip to content

WebError ​

Added in: v1.38

WebError class represents an unhandled exception thrown in the page. It is dispatched via the BrowserContext.WebError event.

csharp
// Log all uncaught errors to the terminal
context.WebError += (_, webError) =>
{
  Console.WriteLine("Uncaught exception: " + webError.Error);
};

Methods ​

WebError.Error() ​

Added in: v1.38

Unhandled error that was thrown.

Returns

  • string

WebError.Location() ​

Added in: v1.60

Returns

  • Object

WebError.Page() ​

Added in: v1.38

The page that produced this unhandled exception, if any.

Returns

  • null | Page

Released under the Apache 2.0 License.