$Sock ErrInfo: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$Sock_ErrInfo}}
{{DISPLAYTITLE:$Sock_ErrInfo}}
<span class="pageSubtitle">Get info about last Janus Sockets error</span>
<span class="pageSubtitle">Get info about last Janus Sockets error</span>
<p class="warn"><b>Note: </b>Most Sirius $functions have been deprecated in favor of Object Oriented
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented
methods. There is currently no direct OO equivalent for this $function.</p>
methods. The OO equivalent for <var>$Sock_ErrInfo</var> is the <var>[[ErrInfo (Socket function)|ErrInfo]]</var> method.</p>


<var>$Sock_ErrInfo</var> retrieves information about the last <var class="product">Janus Sockets</var> error.
<var>$Sock_ErrInfo</var> retrieves information about the last <var class="product">Janus Sockets</var> error.

Latest revision as of 00:00, 21 September 2018

Get info about last Janus Sockets error

Note: Many $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for $Sock_ErrInfo is the ErrInfo method.

$Sock_ErrInfo retrieves information about the last Janus Sockets error.

Syntax

%info = $Sock_ErrInfo(infoType)

Syntax terms

%info A string that contains the requested information.
infoType One of the following strings:
Value Description
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

  • If the return string is null, there was no Janus Sockets error since the thread logged in (note, as described in "Handling connection errors and RESET sockets", that $Sock_Conn does not set the last error information, and a few other $Sock_xxx functions do not set it, either).
  • $Sock_ErrInfo does not have a socket number argument, and thus it is not affected by any ONRESET setting.