1<documentation title="Doc Comment Throws Tag"> 2 <standard> 3 <![CDATA[ 4 If a function throws any exceptions, they should be documented in a @throws tag. 5 ]]> 6 </standard> 7 <code_comparison> 8 <code title="Valid: @throws tag used."> 9 <![CDATA[ 10/** 11 * <em>@throws Exception all the time</em> 12 * @return void 13 */ 14function foo() 15{ 16 throw new Exception('Danger!'); 17} 18]]> 19 </code> 20 <code title="Invalid: No @throws tag used for throwing function."> 21 <![CDATA[ 22/** 23 * @return void 24 */ 25function foo() 26{ 27 throw new Exception('Danger!'); 28} 29]]> 30 </code> 31 </code_comparison> 32</documentation> 33