diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2016-02-24 06:59:37 +0100 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2016-02-24 06:59:37 +0100 |
commit | 0341516a2932e077b547f8105e0ea13f3f56f868 (patch) | |
tree | 00f58b0d7dcb593fafaa69a4c45b9d76fbd24e2e | |
parent | 4392bdcdd40dd433fc8bf4347653ce1a796cb572 (diff) | |
download | luasocket-0341516a2932e077b547f8105e0ea13f3f56f868.tar.gz luasocket-0341516a2932e077b547f8105e0ea13f3f56f868.tar.bz2 luasocket-0341516a2932e077b547f8105e0ea13f3f56f868.zip |
Clarify documentation for try/protect.
-rw-r--r-- | doc/socket.html | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/socket.html b/doc/socket.html index 08ef784..fec09c4 100644 --- a/doc/socket.html +++ b/doc/socket.html | |||
@@ -215,8 +215,9 @@ to throw exceptions. | |||
215 | </p> | 215 | </p> |
216 | 216 | ||
217 | <p class=return> | 217 | <p class=return> |
218 | Returns an equivalent function that instead of throwing exceptions, | 218 | Returns an equivalent function that instead of throwing exceptions in case of |
219 | returns <tt><b>nil</b></tt> followed by an error message. | 219 | a failed <a href=#try><tt>try</tt></a> call, returns <tt><b>nil</b></tt> |
220 | followed by an error message. | ||
220 | </p> | 221 | </p> |
221 | 222 | ||
222 | <!-- select +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 223 | <!-- select +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
@@ -415,8 +416,9 @@ socket.<b>try(</b>ret<sub>1</sub> [, ret<sub>2</sub> ... ret<sub>N</sub>]<b>)</b | |||
415 | </p> | 416 | </p> |
416 | 417 | ||
417 | <p class=description> | 418 | <p class=description> |
418 | Throws an exception in case of error. The exception can only be caught | 419 | Throws an exception in case <tt>ret<sub>1</sub></tt> is falsy, using |
419 | by the <a href=#protect><tt>protect</tt></a> function. | 420 | <tt>ret<sub>2</sub></tt> as the error message. The exception is supposed to be caught |
421 | by a <a href=#protect><tt>protect</tt></a>ed function only. | ||
420 | </p> | 422 | </p> |
421 | 423 | ||
422 | <p class=parameters> | 424 | <p class=parameters> |