jsThrow function

  1. @Since.new('3.15')
Never jsThrow(
  1. JSAny error
)

Throws error in the same manner as JS, without any of Dart's additional exception wrapping.

This is useful when the error is expected to be caught by or displayed to JS users rather than Dart code. Dart's additional wrappers and properties can obscure JS error information in those contexts.

Implementation

@Since('3.15')
external Never jsThrow(JSAny error);