Skip to content

Provide messages in JS errors #39053

@sagudev

Description

@sagudev

Browser always report message with errors, but in servo we only do messages for type and range errors. I think we should start writing actual error messages.

The first step towards it is to add Option<String> field to each variant in

I suggest one for each PR (as we need to fix all occurrences to pass None and eventually build actual errors). See #39056 for example of such PR.

  • IndexSize
  • NotFound
  • HierarchyRequest
  • WrongDocument
  • InvalidCharacter
  • NotSupported
  • InUseAttribute
  • InvalidState
  • Syntax (script: Add message to SyntaxError #39056)
  • Namespace
  • InvalidAccess
  • Security
  • Network
  • Abort
  • Timeout
  • InvalidNodeType
  • TransactionInactive
  • ReadOnly
  • Version
  • NoModificationAllowed
  • TypeMismatch
  • InvalidModification
  • NotReadable
  • Data
  • Operation
  • NotAllowed
  • Encoding
  • Constraint

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/bindingsThe DOM bindingsA-content/domInteracting with the DOM from web contentE-less-complexStraightforward. Recommended for a new contributor.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions