PHPCap Docs | PHPCap API
Overview

Namespaces

  • IU
    • PHPCap
  • PHP

Classes

  • IU\PHPCap\ErrorHandler
  • IU\PHPCap\FileUtil
  • IU\PHPCap\RedCap
  • IU\PHPCap\RedCapApiConnection
  • IU\PHPCap\RedCapProject

Interfaces

  • IU\PHPCap\ErrorHandlerInterface
  • IU\PHPCap\RedCapApiConnectionInterface

Exceptions

  • Exception
  • IU\PHPCap\PhpCapException
  • Overview
  • Namespace
  • Class
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 
<?php

namespace IU\PHPCap;

/**
 * Default error handler for PHPCap. PHPCap will call
 * the throwException method of this class when
 * an error occurs.
 */
class ErrorHandler implements ErrorHandlerInterface
{
    /**
     * {@inheritdoc}
     *
     * @see <a href="http://php.net/manual/en/function.debug-backtrace.php">debug_backtrace()</a>
     *     for information on how to get a stack trace within this method.
     */
    public function throwException(
        $message,
        $code,
        $connectionErrorNumber = null,
        $httpStatusCode = null,
        $previousException = null
    ) {
        throw new PhpCapException(
            $message,
            $code,
            $connectionErrorNumber,
            $httpStatusCode,
            $previousException
        );
    }
}
PHPCap API documentation generated by ApiGen