Skip to content

Commit

Permalink
add more default names of exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mohorev authored and qiangxue committed Oct 31, 2014
1 parent 497e1fe commit b2341ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions framework/base/ErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,20 @@ public function getName()
{
$names = [
E_ERROR => 'PHP Fatal Error',
E_WARNING => 'PHP Warning',
E_PARSE => 'PHP Parse Error',
E_NOTICE => 'PHP Notice',
E_CORE_ERROR => 'PHP Core Error',
E_COMPILE_ERROR => 'PHP Compile Error',
E_USER_ERROR => 'PHP User Error',
E_WARNING => 'PHP Warning',
E_CORE_WARNING => 'PHP Core Warning',
E_COMPILE_ERROR => 'PHP Compile Error',
E_COMPILE_WARNING => 'PHP Compile Warning',
E_USER_ERROR => 'PHP User Error',
E_USER_WARNING => 'PHP User Warning',
E_USER_NOTICE => 'PHP User Notice',
E_STRICT => 'PHP Strict Warning',
E_NOTICE => 'PHP Notice',
E_RECOVERABLE_ERROR => 'PHP Recoverable Error',
E_DEPRECATED => 'PHP Deprecated Warning',
E_USER_DEPRECATED => 'PHP User Deprecated Warning',
];

return isset($names[$this->getCode()]) ? $names[$this->getCode()] : 'Error';
Expand Down

0 comments on commit b2341ed

Please sign in to comment.