-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathException.php
More file actions
executable file
·37 lines (31 loc) · 1011 Bytes
/
Exception.php
File metadata and controls
executable file
·37 lines (31 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* A base implementation for exceptions thrown by the framework.
*
* @author Jorgen Evens <jorgen@wlab.be>
* @package WebLab
* @subpackage Exception
*
*/
abstract class WebLab_Exception extends Exception {
protected $_trace;
public static function reporting() {
$error_reporting = WebLab_Config::getApplicationConfig()->get( 'Application.Error.reporting' );
if( is_string( $error_reporting ) ) {
$error_reporting = constant( $error_reporting );
}
error_reporting( $error_reporting );
}
protected function _updateTrace() {
if( empty( $this->_trace ) )
$this->_trace = $this->getTrace();
}
public function getClass() {
$this->_updateTrace();
return $this->_trace[0]['class'];
}
public function getMethod() {
$this->_updateTrace();
return $this->_trace[0]['function'];
}
}