Class PhpCapException
Exception class for PHPCap exceptions. This is the exception that PHPCap will throw when it encounters an error.
Example usage:
try { $projectInfo = $project->exportProjectInfo(); } catch (PhpCapException $exception) { print "The following error occurred: {$exception->getMessage()}\n"; print "Error code: {$exception->getCode()}\n"; $connectionErrorNumber = $exception->getConnectionErrorNumber(); if (isset($connectionErrorNumber)) { print "A connection error occurred.\n"; print "Connection error number: {$connectionErrorNumber}\n"; } print "Stack trace:\n{$exception->getTraceAsString()}\n"; }
- Exception
-
IU\PHPCap\PhpCapException
Namespace: IU\PHPCap
See:
Located at PhpCapException.php
See:
http://php.net/manual/en/class.exception.php Information on additional methods provided by parent class Exception.
Located at PhpCapException.php
public
|
+/-
__construct( string $message, integer $code, integer $connectionErrorNumber = null, integer $httpStatusCode = null,
Constructor. |
public
integer|null
|
+/-
getConnectionErrorNumber( )
Returns the connection error number, or null if there was no connection error. The possible numbers returned will depend on the type of connection class being used. For example, if cURL is being used, then the cURL error number would be returned. |
public
integer|null
|
__toString(),
__wakeup(),
getCode(),
getFile(),
getLine(),
getMessage(),
getPrevious(),
getTrace(),
getTraceAsString()
|