Module errors

Module errors 

Source
Expand description

The errors for crate and php.

Structs§

ArgumentCountError
Throw when actual arguments count is not greater than expect in calling functions.
ClassNotFoundError
Class not found, get the class by name failed, etc.
ExceptionGuard
Guarder for preventing the thrown exception from being overwritten.
ExpectTypeError
Expect type is not the actual type.
InitializeObjectError
Failed to initialize object.
NotImplementThrowableError
Failed when the object isn’t implement PHP Throwable.
ThrowObject
Wrapper of Throwable object.

Enums§

Error
Crate level Error, which also can become an exception in php.

Traits§

Throwable
PHP Throwable, can cause throwing an exception when setting to crate::values::ZVal.

Functions§

argument_count_error_classNot (phper_major_version=7 and phper_minor_version=0)
Predefined class ArgumentCountError (>= PHP 7.1.0).
arithmetic_error_class
Predefined class ArithmeticError.
division_by_zero_error
Predefined class DivisionByZeroError.
error_class
Predefined class Error.
error_exception_class
Predefined class ErrorException.
exception_class
Predefined class Exception.
ok
Equivalent to Ok::<_, phper::Error>(value).
parse_error_class
Predefined class ParseError.
throw
Safety
throwable_class
Predefined interface Throwable.
type_error_class
Predefined class TypeError.

Type Aliases§

Result
Type of Result<T, crate::Error>.