Note: information on this page refers to Ceylon 1.0, not to the current release.
throws
annotation
The throws
annotation documents an exception that can be thrown by a
function, value, or class.
Usage
The annotation accepts a program element reference
expression
identifying a class of Exception
that is thrown, along with a
description of the conditions that cause the exception.
throws (`class AssertionException`, "if `i < 0`")
void example(Integer i) {
assert (i>=0);
}
Description
The throws
annotation is processed by the
ceylon doc
tool.
Its description
is assumed to contain Markdown formatted text.
See also
throws
- Reference for annotations in general