1930ad091713419d28ed3766328c83a1cdf9caf7
3 namespace seekat\Exception
;
8 * @param string|Throwable $message
11 function exception(&$message) : Throwable
{
12 if ($message instanceof Throwable
){
13 $exception = $message;
14 $message = $exception->getMessage();
16 $exception = new \
Exception($message);
22 * Canonical error message from a string or Exception
23 * @param string|Throwable $error
25 function message(&$error) : ?
string {
26 if ($error instanceof Throwable
) {
27 $message = $error->getMessage();
30 $error = new \
Exception($message);