PHPCap Docs | PHPCap API
Overview

Namespaces

  • IU
    • PHPCap
  • PHP

Classes

  • ErrorHandler
  • FileUtil
  • RedCap
  • RedCapApiConnection
  • RedCapProject

Interfaces

  • ErrorHandlerInterface
  • RedCapApiConnectionInterface

Exceptions

  • PhpCapException
  • Overview
  • Namespace
  • Class

Interface ErrorHandlerInterface

Interface for error handlers for PHPCap.

Direct known implementers

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

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.

Constants summary
integer INVALID_ARGUMENT

Invalid argument passed to a PHPCap method.

Invalid argument passed to a PHPCap method.

+/- 1
integer TOO_MANY_ARGUMENTS

Too many arguments were passed to the method.

Too many arguments were passed to the method.

+/- 2
integer INVALID_URL

An invalid URL was used.

An invalid URL was used.

+/- 3
integer CA_CERTIFICATE_FILE_NOT_FOUND

A CA certificate file was specified, but it could not be found.

A CA certificate file was specified, but it could not be found.

+/- 4
integer CA_CERTIFICATE_FILE_UNREADABLE

The CA certificate file could not be read.

The CA certificate file could not be read.

+/- 5
integer CONNECTION_ERROR

A connection error occurred.

A connection error occurred.

+/- 6
integer REDCAP_API_ERROR

The REDCap API generated an error.

The REDCap API generated an error.

+/- 7
integer JSON_ERROR

A JSON error occurred. This would typically happen when PHPCap is expecting the REDCap API to return data in JSON format, but the result returned is not valid JSON.

A JSON error occurred. This would typically happen when PHPCap is expecting the REDCap API to return data in JSON format, but the result returned is not valid JSON.

+/- 8
integer OUTPUT_FILE_ERROR

The output file could not be found, or was found and could not be written

The output file could not be found, or was found and could not be written

+/- 9
integer INPUT_FILE_NOT_FOUND

The input file could not be found.

The input file could not be found.

+/- 10
integer INPUT_FILE_UNREADABLE

The input file was found, but is unreadable.

The input file was found, but is unreadable.

+/- 11
integer INPUT_FILE_ERROR

The input file contents are invalid.

The input file contents are invalid.

+/- 12
PHPCap API documentation generated by ApiGen