error method

UserError error(
  1. String message
)

Throw a runtime error. If called with no arguments inside the second argument to default, re-throw the current error.

Implementation

UserError error(String message) => UserError(message, {});