Class Go
Exception
class Exception {
- public string $message;
- public int $code;
- public string $class;
- public function __construct(string $message, int $code);
- public function get_code(): int;
- public function get_message(): string;
- public function throwable_class(): string;
}
Description
Exception is PHP's base exception class; the SPL exception and Error classes are the same Go type carrying a different class name and a catch clause filters on the name and not on a subclass relation.
Exception is a class phpscript declares.
$object = new Exception($message, $code);
Properties
public string $message-
The go field
Message. public int $code-
The go field
Code. public string $class-
The go field
Class.
Methods
public function get_code(): int-
get_code returns the error code of the exception.
The go method
GetCode. public function get_message(): string-
get_message returns the error message of the exception.
The go method
GetMessage. public function throwable_class(): string-
throwable_class returns the PHP class the exception declares, implementing runner.Throwable.
The go method
ThrowableClass.
Binding
- The go type
github.com/titpetric/phpscript/stdlib.Exception. - Registered by the package
github.com/titpetric/phpscript/stdlib. - Built on
github.com/titpetric/phpscript/stdlib.Exception. - Satisfies
github.com/titpetric/phpscript/runner.Throwable, which a script namesThrowable.