シノニム
exception
構文
@throws フリーフォームの説明
@throws {<型>}
@throws {<型>} フリーフォームの説明
概要
@throws タグを使用すると、関数がスローする可能性のあるエラーを記述することができます。@throws タグは 1 つの JSDoc コメント内で複数回含めることができます。
例
/**
* @throws {InvalidArgumentException}
*/
function foo(x) {}
/**
* @throws Will throw an error if the argument is null.
*/
function bar(x) {}
/**
* @throws {DivideByZero} Argument x must be non-zero.
*/
function baz(x) {}