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
);
}
}