You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/tooling/graindoc.md
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,24 @@ This attribute requires a description of the return value. In the Grain standard
69
69
70
70
When generating docs, the type of the return value will be detected by the compiler and added to the row in the "Returns" table.
71
71
72
+
### @throws
73
+
74
+
```gr
75
+
/**
76
+
* @throws Exception(Types): description
77
+
*/
78
+
79
+
/**
80
+
* @throws Exception: description
81
+
*/
82
+
```
83
+
84
+
The `@throws` attribute provides information about any exceptions the function may throw.
85
+
86
+
This attribute requires an exception and types of the exception data before the colon (`:`) and a description of when the exception occurs after the colon.
87
+
88
+
When generating docs, adds the exception to the output followed by a list of cases where the exception occurs.
0 commit comments