完善Error类

This commit is contained in:
thinkphp
2016-05-21 17:16:02 +08:00
parent 744cdaebff
commit 60f6d10e16

View File

@@ -11,10 +11,10 @@
namespace think;
use think\console\Output as ConsoleOutput;
use think\exception\ErrorException;
use think\exception\Handle;
use think\exception\ThrowableError;
use think\console\Output as ConsoleOutput;
class Error
{
@@ -24,7 +24,7 @@ class Error
*/
public static function register()
{
error_reporting(-1);
error_reporting(E_ALL);
set_error_handler([__CLASS__, 'appError']);
set_exception_handler([__CLASS__, 'appException']);
register_shutdown_function([__CLASS__, 'appShutdown']);
@@ -97,7 +97,6 @@ class Error
return in_array($type, [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE]);
}
/**
* Get an instance of the exception handler.
*