ErrorText (LDAP function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with " <span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> ErrorText property <p> <var>ErrorText</var> is a member of the <var>...")
 
m (1 revision)
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template:LDAP:ErrorText subtitle}}


<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
This method is a [[Classes and Objects#readWrite|readOnly]] property that reports the error message text from the
[[Category:Ldap methods|ErrorText property]]
last <var>LDAP</var> method for which an error message was returned.
<p>
<var>ErrorText</var> is a member of the <var>[[Ldap class|Ldap]]</var> class.
</p>
 
This method is a read-only property that reports the error message text from the
last <var>Ldap</var> method for which an error message was returned.
==Syntax==
==Syntax==
<p class="syntax">%msg = %ld:ErrorText
{{Template:LDAP:ErrorText syntax}}
</p>
===Syntax terms===
===Syntax terms===
<table>
<table class="syntaxTable">
<tr><th>%msg
<tr><th>%string</th>
</th><td>A string variable to contain the returned error message text. The ''%msg'' value is an empty string if no methods have been called.
<td>A string variable to contain the returned error message text. The <var class="term">%string</var> value is an empty string if no methods have been called.</td></tr>
</td></tr>
<tr><th>ldap</th>
<tr><th>%ld
<td>An <var>LDAP</var> object variable.</td></tr>
</th><td>An <var>Ldap</var> object variable.
</table>
</td></tr></table>
 
==Usage Notes==
==Usage notes==
<ul>
<ul>
<li>The <var>[[ErrorNumber (Ldap property)|ErrorNumber]]</var> property reports
<li>The <var>[[ErrorNumber (LDAP function)|ErrorNumber]]</var> method reports
the error number associated with the ErrorText message or a number
the error number associated with the ErrorText message or a number
of a related error.
of a related error.
<li>The <var>ErrorText</var> message will be the same as that indicated by the status
<li>The <var>ErrorText</var> message will be the same as that indicated by the status
return from <var>Ldap</var> methods
return from <var>LDAP</var> methods
for problems &ldquo;internal&rdquo; to the client, will be a message from a
for problems "internal" to the client, will be a message from a
related error, or will be a message from a server-reported error.
related error, or will be a message from a server-reported error.
<li>If an <var>ErrorText</var> message (and number) contain information reported by the
<li>If an <var>ErrorText</var> message (and number) contain information reported by the
Line 34: 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>-5</code>,
<li>An <var>LDAP</var> <var>Bind</var> call fails and returns a status value of <code>-5</code>,
which indicates that the bind authorization failed.
which indicates that the bind authorization failed.
When the following statement was issued:
When the following statement was issued:
<p class="code"> Print 'Error text is ': ' %ld:ErrorText
<p class="code">Print 'Error text is ': ' %ld:ErrorText
</p>
</p>


Line 45: Line 40:
<var>ErrorText</var> and returned status provide corroborating information.
<var>ErrorText</var> and returned status provide corroborating information.
</ul>
</ul>
==See also==
{{Template:LDAP:ErrorText footer}}

Latest revision as of 22:25, 16 November 2012

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


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

Syntax

%string = ldap:ErrorText

Syntax terms

%string A string variable to contain the returned error message text. The %string value is an empty string if no methods have been called.
ldap An LDAP object variable.

Usage notes

  • The ErrorNumber method reports the error number associated with the ErrorText message or a number of a related error.
  • The ErrorText message will be the same as that indicated by the status return from LDAP methods for problems "internal" to the client, will be a message from a related error, or will be a message from a server-reported error.
  • If an ErrorText message (and number) 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 -5, which indicates that the bind authorization failed. When the following statement was issued:

    Print 'Error text is ': ' %ld:ErrorText

    The result was: Error text is LDBIND FTPCONN failed to connect. ErrorText and returned status provide corroborating information.

See also