Exceptions
You can use annotation tags to describe exceptions that are thrown by native functions.
- @throws <exception-name> <description>
- Describes an exception that is thrown by a native function.
The following example shows the SPLDOC markup and code for the createCustomMetric C++
native function in the SPL Standard Toolkit:
<function> <description> Get the specified custom metric value ... @throws SPLRuntimeInvalidMetricException If the metric does not exist. </description> <prototype> <![CDATA[ public stateful void getCustomMetricValue(rstring name, mutable int64 value) ]]> </prototype> </function>
The spl-make-doc command generates documentation:
Throws
- SPLRuntimeInvalidMetricException
- If the metric already exists.