Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
97eda21a
Commit
97eda21a
authored
Feb 20, 2013
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ErrorException now extends from Exception
parent
2d5db951
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
ErrorException.php
framework/base/ErrorException.php
+31
-1
No files found.
framework/base/ErrorException.php
View file @
97eda21a
...
@@ -15,8 +15,38 @@ namespace yii\base;
...
@@ -15,8 +15,38 @@ namespace yii\base;
* @author Alexander Makarov <sam@rmcreative.ru>
* @author Alexander Makarov <sam@rmcreative.ru>
* @since 2.0
* @since 2.0
*/
*/
class
ErrorException
extends
\Error
Exception
class
ErrorException
extends
Exception
{
{
protected
$severity
;
/**
* Constructs the exception
* @link http://php.net/manual/en/errorexception.construct.php
* @param $message [optional]
* @param $code [optional]
* @param $severity [optional]
* @param $filename [optional]
* @param $lineno [optional]
* @param $previous [optional]
*/
public
function
__construct
(
$message
=
''
,
$code
=
0
,
$severity
=
1
,
$filename
=
__FILE__
,
$lineno
=
__LINE__
,
\Exception
$previous
=
null
)
{
parent
::
__construct
(
$message
,
$code
,
$previous
);
$this
->
severity
=
$severity
;
$this
->
file
=
$filename
;
$this
->
line
=
$lineno
;
}
/**
* Gets the exception severity
* @link http://php.net/manual/en/errorexception.getseverity.php
* @return int the severity level of the exception.
*/
final
public
function
getSeverity
()
{
return
$this
->
severity
;
}
public
static
function
getFatalCodes
()
public
static
function
getFatalCodes
()
{
{
return
array
(
E_ERROR
,
E_PARSE
,
E_CORE_ERROR
,
E_CORE_WARNING
,
E_COMPILE_ERROR
,
E_COMPILE_WARNING
);
return
array
(
E_ERROR
,
E_PARSE
,
E_CORE_ERROR
,
E_CORE_WARNING
,
E_COMPILE_ERROR
,
E_COMPILE_WARNING
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment