PEAR::expectError()

PEAR::expectError() – add an error code for non-disabling temporary error handling

Synopsis

require_once 'PEAR.php';

integer PEAR::expectError ( mixed $errorCode = '*' )

Description

This method is used to tell which errors you expect to get. Expected errors are always returned with error mode PEAR_ERROR_RETURN. Expected error codes are stored in a stack, and this method pushes a new element onto it. The list of expected errors are in effect until they are popped off the stack with the popExpect() method.

Parameter

  • mixed $errorCode - the expected PEAR_Error error code or an array of error codes. If set to '*' every error is expected.

Return value

integer - the size of the error code stack.

Note

This function can not be called statically.

sets handling of errors generated through PEAR packages (Previous) removes the last error code for non-disabling temporary error handling (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.