ErrInfo (Socket function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
class="product">Janus Sockets</var> error.
class="product">Janus Sockets</var> error.
The <var>ErrInfo</var> function is similar in effect to
The <var>ErrInfo</var> function is similar in effect to
<var>[[$Sock_Errinfo]]</var>.
<var>[[$Sock_ErrInfo]]</var>.


==Syntax==
==Syntax==
Line 14: Line 14:
<td>A string variable to contain the returned error information. If no <var class="product">Janus Sockets</var> error has occurred since the thread logged in, a null string is returned.
<td>A string variable to contain the returned error information. If no <var class="product">Janus Sockets</var> error has occurred since the thread logged in, a null string is returned.
</td></tr>
</td></tr>
<tr><th><var>%(Socket)</var></th>
 
<td>The class name in parentheses denotes a shared method. Specifying <code>%(Socket):</code> is not the only way to invoke the method (see [[??]] refid=themeth.).
<tr><th><var class="nobr">%(Socket)</var></th>
</td></tr>
<td>The class name in parentheses denotes a shared method. <var>ErrInfo</var> can also be invoked via a <var>Socket</var> object variable, which may be <var>Null</var>.</td></tr>
 
<tr><th>string</th>
<tr><th>string</th>
<td>One of the following strings: <table class="syntaxTable"> <tr><th><var>CODE</var> </th><td>Retrieve the code from the last <var class="product">Janus Sockets</var> error.
<td>One of the following strings: <table class="syntaxTable"> <tr><th><var>CODE</var> </th><td>Retrieve the code from the last <var class="product">Janus Sockets</var> error.
</td></tr>
</td></tr>
<tr><th><var>SOCKNUM</var>
<tr><th><var>SOCKNUM</var>
</th><td>Retrieve the socket number used by the last <var class="product">Janus Sockets</var> operation with an error condition.
</th><td>Retrieve the socket number used by the last <var class="product">Janus Sockets</var> operation with an error condition.
</td></tr>
</td></tr>
<tr><th><var>FUN</var>
<tr><th><var>FUN</var>
</th><td>Retrieve the name of the $function producing the last <var class="product">Janus Sockets</var> error. This may also be the string "Captured print", if a captured "print" operation was the last operation that encountered a <var class="product">Janus Sockets</var> error.  </td></tr></table>
</th><td>Retrieve the name of the $function producing the last <var class="product">Janus Sockets</var> error. This may also be the string "Captured print", if a captured "print" operation was the last operation that encountered a <var class="product">Janus Sockets</var> error.  </td></tr></table>
Line 28: Line 31:
</td></tr></table>
</td></tr></table>


<var>ErrInfo</var> is not affected by any <code>ONRESET</code> setting.
==Usage notes==
<ul>
<li><var>ErrInfo</var> is not affected by any <code>ONRESET</code> setting. </li>
</ul>


==See also==
{{Template:Socket:ErrInfo footer}}
{{Template:Socket:ErrInfo footer}}

Latest revision as of 20:17, 25 August 2014

Retrieve info about the most recent socket error (Socket class)


This shared method retrieves information about the last Janus Sockets error. The ErrInfo function is similar in effect to $Sock_ErrInfo.

Syntax

%string = %(Socket):ErrInfo( string)

Syntax terms

%string A string variable to contain the returned error information. If no Janus Sockets error has occurred since the thread logged in, a null string is returned.
%(Socket) The class name in parentheses denotes a shared method. ErrInfo can also be invoked via a Socket object variable, which may be Null.
string One of the following strings:
CODE Retrieve the code from the last Janus Sockets error.
SOCKNUM Retrieve the socket number used by the last Janus Sockets operation with an error condition.
FUN Retrieve the name of the $function producing the last Janus Sockets error. This may also be the string "Captured print", if a captured "print" operation was the last operation that encountered a Janus Sockets error.

Usage notes

  • ErrInfo is not affected by any ONRESET setting.

See also