]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update docs for timeout/catch
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 30 Apr 2025 18:28:19 +0000 (14:28 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 30 Apr 2025 20:22:51 +0000 (16:22 -0400)
Mostly removing evidence of its previous existence

doc/antora/modules/reference/pages/unlang/catch.adoc
doc/antora/modules/reference/pages/unlang/timeout.adoc

index bee5a5159e469acbe0b4216d44af119e2cd52e4b..26a71e65b6a924c21429791235401f925a72ce3c 100644 (file)
@@ -11,17 +11,16 @@ catch [ rcodes ] {
 }
 ----
 
-The `catch` statement runs a series of substatements in a block, but only if the previous xref:unlang/try.adoc[try] failed. 
+The `catch` statement runs a series of substatements in a block, but only if the previous xref:unlang/try.adoc[try] failed.
 
-[ rcodes ]:: Zero or more module return codes.  The return codes can be `disallow`, `fail`, `invalid`, or `reject`.
+[ rcodes ]:: Zero or more module return codes.  The return codes can be `disallow`, `fail`, `invalid`, `timeout`, or `reject`.
 +
-If the `catch` statement is after a xref:unlang/timeout.adoc[timeout] statement, then the `catch` will run only if the `timeout` section fails.  In this case, you must use `catch timeout { ... }`.  The `catch timeout` syntax is not allowed in any other situation.
 
 [ statements ]:: The `unlang` commands which will be executed.  A `catch` block can be empty.
 
 If no rcode is given the `catch` statement matches all of the codes listed above.  Otherwise, the `catch` statement matches one of the listed rcodes.
 
-Multiple `catch` statements can be placed one after the other, to `catch` different errors.  Only one of the statements will be executed.  Once a `catch` statement is finished, the interpreter will skip all trailing `catch` statements, and continue execution 
+Multiple `catch` statements can be placed one after the other, to `catch` different errors.  Only one of the statements will be executed.  Once a `catch` statement is finished, the interpreter will skip all trailing `catch` statements, and continue execution
 
 .Example
 
index b98ecd50b8ca48ab4dec1a318c3db0bbefbee4ac..e0787545149edb294e48b0f78302f1218972eb74 100644 (file)
@@ -20,11 +20,6 @@ attribute reference.  The contents of _<value>_ are interpreted as a
 The time scale can be changed by appending `s`, `us`, `ms`, `ns`, etc. as
 with all uses of `time_delta` values.
 
-As a special case, a `timeout` section can be immediately followed by
-a xref:unlang/catch.adoc[catch] statement, as `catch timeout { ... }`.
-In that case, the xref:unlang/catch.adoc[catch] section is run when
-the `timeout` expires.
-
 .Example
 [source,unlang]
 ----
@@ -44,16 +39,16 @@ called.
 .Example using catch
 [source,unlang]
 ----
-timeout 4s {
-    sql
+try {
+    timeout 4s {
+        sql
+    }
 }
 catch timeout {
     detail
 }
 ----
 
-
-
 == Timeout with redundant
 
 The `timeout` can also be used inside of a