PHPCap Docs | PHPCap API
Overview

Namespaces

  • IU
    • PHPCap
  • PHP

Classes

  • ErrorHandler
  • FileUtil
  • RedCap
  • RedCapApiConnection
  • RedCapProject

Interfaces

  • ErrorHandlerInterface
  • RedCapApiConnectionInterface

Exceptions

  • PhpCapException
  • Overview
  • Namespace
  • Class

Class ErrorHandler

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

IU\PHPCap\ErrorHandler implements IU\PHPCap\ErrorHandlerInterface
Namespace: IU\PHPCap
Located at ErrorHandler.php
Methods summary
public
+/- throwException( string $message, integer $code, integer $connectionErrorNumber = null, integer $httpStatusCode = null, Throwable $previousException = null )

Throw an exception for the specified values.

Throw an exception for the specified values.

Parameters

$message
message describing the error that occurred.
$code
the error code.
$connectionErrorNumber

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

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

$previousException

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

See

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


Implementation of

IU\PHPCap\ErrorHandlerInterface::throwException()
Constants inherited from IU\PHPCap\ErrorHandlerInterface
CA_CERTIFICATE_FILE_NOT_FOUND, CA_CERTIFICATE_FILE_UNREADABLE, CONNECTION_ERROR, INPUT_FILE_ERROR, INPUT_FILE_NOT_FOUND, INPUT_FILE_UNREADABLE, INVALID_ARGUMENT, INVALID_URL, JSON_ERROR, OUTPUT_FILE_ERROR, REDCAP_API_ERROR, TOO_MANY_ARGUMENTS
PHPCap API documentation generated by ApiGen