Tribe__Repository::cast_error_to_exception( int $code, string $message )
A utility method to cast any PHP error into an exception proper.
Contents
Usage: `set_error_handler( array( $repository, ‘cast_error_to_exception’ ) );
Parameters
- $code
-
(int) (Required) The error code.
- $message
-
(string) (Required) The error message.
Source
File: src/Tribe/Repository.php
public function cast_error_to_exception( $code, $message ) {
throw new RuntimeException( $message, $code );
}
Changelog
| Version | Description |
|---|---|
| 4.9.5 | Introduced. |