playwright/docs/src/api/class-error.md
Dmitry Gozman c68f57d2d0
docs: mark optional properties/arguments explicitly with "?" (#13369)
Previously, we were guessing whether something is optional from the
comment (looking for stuff like "defaults to" or "optional").

To remove this error-prone technique, every optional property or
argument (but not option) is explicitly marked with "?".
2022-04-06 19:02:10 -07:00

673 B

class: Error

  • langs: python
  • extends: [Exception]

Error is raised whenever certain operations are terminated abnormally, e.g. browser closes while [method: Page.evaluate] is running. All Playwright exceptions inherit from this class.

property: Error.message

  • returns: <[str]>

Message of the error.

property: Error.name

  • returns: ?<[str]>

Name of the error which got thrown inside the browser. Optional.

property: Error.stack

  • returns: ?<[str]>

Stack of the error which got thrown inside the browser. Optional.