throws top-level constant

Throws const throws

Constant instance of Throws annotation.

Use this to annotate functions that can throw exceptions:

@throws
void myFunction() {
  throw Exception('Error');
}

Implementation

const throws = Throws();