ErrorNumber (LDAP function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:LDAP:ErrorNumber subtitle}}
{{Template:LDAP:ErrorNumber subtitle}}


This method is a read-only property that reports the error number
This method is a [[Classes and Objects#readWrite|readOnly]] property that reports the error number
from the last <var>Ldap</var> method for which an error number was returned.
from the last <var>LDAP</var> method for which an error number was returned.
==Syntax==
==Syntax==
{{Template:LDAP:ErrorNumber syntax}}
{{Template:LDAP:ErrorNumber syntax}}
===Syntax terms===
===Syntax terms===
<table>
<table class="syntaxTable">
<tr><th>%num
<tr><th>%number
</th><td>A float variable to contain the integer-valued error number.
</th><td>A float variable to contain the integer-valued error number.
</td></tr>
</td></tr>
<tr><th>%ld
<tr><th>LDAP
</th><td>An <var>Ldap</var> object variable.
</th><td>An <var>LDAP</var> object variable.
</td></tr></table>
</td></tr></table>
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The <var>[[ErrorText (LDAP property)|ErrorText]]</var> property reports a
<li>The <var>[[ErrorText (LDAP function)|ErrorText]]</var> property reports a
short description of the error associated with the <var>ErrorNumber</var> value
short description of the error associated with the <var>ErrorNumber</var> value
or additional information related to the error.
or additional information related to the error.
<li>The <var>ErrorNumber</var> value will be the same as the status return from <var>Ldap</var> methods
<li>The <var>ErrorNumber</var> value will be the same as the status return from <var>LDAP</var> methods
for problems "internal" to the client, will contain a value from a
for problems "internal" to the client, will contain a value from a
related error, or will contain a value from a server-reported error.
related error, or will contain a value from a server-reported error.
Line 27: Line 28:
but no accompanying diagnostic text for these codes is standardized.
but no accompanying diagnostic text for these codes is standardized.
</ul>
</ul>
==Examples==
==Examples==
<ul>
<ul>
<li>An <var>Ldap</var> <var>Bind</var> call fails and returns a status value of <code>-110</code>,
<li>An <var>LDAP</var> <var>Bind</var> call fails and returns a status value of <code>-110</code>,
which indicates a problem with the Janus port definition.
which indicates a problem with the Janus port definition.
When the following statement was issued:
When the following statement was issued:
<p class="code"> Print 'Error number is ': ' %ld:ErrorNumber
<p class="code">Print 'Error number is ': ' %ld:ErrorNumber
</p>
</p>


The result was: <code>Error number is -110</code>.
The result was: <code>Error number is -110</code>.
<var>ErrorNumber</var> and status return both point to the client fault.
<var>ErrorNumber</var> and status return both point to the client fault.
<li>An <var>Ldap</var> <var>Find</var> call fails and returns a status value of <code>-5</code>,
<li>An <var>LDAP</var> <var>Find</var> call fails and returns a status value of <code>-5</code>,
which indicates an "error obtained from server."
which indicates an "error obtained from server."
When the following statement was issued:
When the following statement was issued:
<p class="code"> Print 'Error number is ': ' %ld:ErrorNumber
<p class="code">Print 'Error number is ': ' %ld:ErrorNumber
</p>
</p>



Latest revision as of 22:25, 16 November 2012

Error number of the most recent LDAP error (LDAP class)


This method is a readOnly property that reports the error number from the last LDAP method for which an error number was returned.

Syntax

%number = ldap:ErrorNumber

Syntax terms

%number A float variable to contain the integer-valued error number.
LDAP An LDAP object variable.

Usage notes

  • The ErrorText property reports a short description of the error associated with the ErrorNumber value or additional information related to the error.
  • The ErrorNumber value will be the same as the status return from LDAP methods for problems "internal" to the client, will contain a value from a related error, or will contain a value from a server-reported error.
  • If an ErrorNumber (and text) contain information reported by the server, they may conform to the LDAP RFC, which lists dozens of such server result codes (positive integers) and descriptions, but no accompanying diagnostic text for these codes is standardized.

Examples

  • An LDAP Bind call fails and returns a status value of -110, which indicates a problem with the Janus port definition. When the following statement was issued:

    Print 'Error number is ': ' %ld:ErrorNumber

    The result was: Error number is -110. ErrorNumber and status return both point to the client fault.

  • An LDAP Find call fails and returns a status value of -5, which indicates an "error obtained from server." When the following statement was issued:

    Print 'Error number is ': ' %ld:ErrorNumber

    The result was: Error number is 4, and the ErrorText string indicated that "the size limit of returned entries has been exceeded." ErrorNumber and status return, though different, both point to a server issue.

See also