PHPCap API

ErrorHandler
in package
implements ErrorHandlerInterface

Default error handler for PHPCap. PHPCap will call the throwException method of this class when an error occurs.

Interfaces, Classes, Traits and Enums

ErrorHandlerInterface
Interface for error handlers for PHPCap.

Table of Contents

throwException()  : mixed
Throw an exception for the specified values.

Methods

throwException()

Throw an exception for the specified values.

public throwException(mixed $message, mixed $code[, mixed $connectionErrorNumber = null ][, mixed $httpStatusCode = null ][, mixed $previousException = null ]) : mixed

See debug_backtrace for information on how to get a stack trace within this method.

Parameters
$message : mixed

message describing the error that occurred.

$code : mixed

the error code.

$connectionErrorNumber : mixed = null

the error number from the underlying connection used, of null if no connection error occurred. For example, if cURL is being used (the default) this will be the cURL error number if a connection error occurs.

$httpStatusCode : mixed = null

https status code, which would typcially be set if an error occurs with the http response from the REDCap API.

$previousException : mixed = null

the previous exception that occurred that caused this exception, if any.

Return values
mixed

Search results