Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
TypeError.php
Go to the documentation of this file.
1
<?php
2
3
4
namespace
Ubiquity\debug\core
;
5
6
7
class
TypeError
{
8
const
ERRORS
=[E_ERROR=>
'Error'
,E_PARSE=>
'Parse exception'
,E_COMPILE_ERROR=>
'Compile error'
,E_WARNING=>
'Warning'
];
9
public
static
function
asString
($error){
10
if
($error instanceof \Error || $error instanceof \Exception){
11
return \get_class($error);
12
}
13
if
(\is_int($error)) {
14
return
self::ERRORS[$error] ?? $error;
15
}
16
if
(is_string($error)) {
17
return
$error;
18
}
19
return
'Unknown error'
;
20
}
21
22
}
Ubiquity\debug\core\TypeError
Definition
TypeError.php:7
Ubiquity\debug\core\TypeError\ERRORS
const ERRORS
Definition
TypeError.php:8
Ubiquity\debug\core\TypeError\asString
static asString($error)
Definition
TypeError.php:9
Ubiquity\debug\core
Definition
TypeError.php:4
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity-debug
src
Ubiquity
debug
core
TypeError.php
Generated on Sun Dec 10 2023 15:04:06 for
Ubiquity
by
doxygen
1.9.8