Clarify documentation for try/protect.

This commit is contained in:
Philipp Janda 2016-02-24 06:59:37 +01:00
parent 4392bdcdd4
commit 0341516a29

View File

@ -215,8 +215,9 @@ to throw exceptions.
</p> </p>
<p class=return> <p class=return>
Returns an equivalent function that instead of throwing exceptions, Returns an equivalent function that instead of throwing exceptions in case of
returns <tt><b>nil</b></tt> followed by an error message. a failed <a href=#try><tt>try</tt></a> call, returns <tt><b>nil</b></tt>
followed by an error message.
</p> </p>
<!-- select +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> <!-- select +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
@ -415,8 +416,9 @@ socket.<b>try(</b>ret<sub>1</sub> [, ret<sub>2</sub> ... ret<sub>N</sub>]<b>)</b
</p> </p>
<p class=description> <p class=description>
Throws an exception in case of error. The exception can only be caught Throws an exception in case <tt>ret<sub>1</sub></tt> is falsy, using
by the <a href=#protect><tt>protect</tt></a> function. <tt>ret<sub>2</sub></tt> as the error message. The exception is supposed to be caught
by a <a href=#protect><tt>protect</tt></a>ed function only.
</p> </p>
<p class=parameters> <p class=parameters>