diff --git a/System/Error/ErrorHandler.php b/System/Error/ErrorHandler.php index 14091e1f..073fe9e3 100644 --- a/System/Error/ErrorHandler.php +++ b/System/Error/ErrorHandler.php @@ -99,7 +99,7 @@ class ErrorHandler extends Component implements ErrorInterface $error[0] = 500; } - $data = JSON::to(500, 'Error : ' . $error[1], $path); + $data = JSON::to(500, $error[1], $path); Snowflake::app()->getLogger()->error($data, 'error'); diff --git a/System/Process/ServerInotify.php b/System/Process/ServerInotify.php index 17e86f7b..ff42321c 100644 --- a/System/Process/ServerInotify.php +++ b/System/Process/ServerInotify.php @@ -184,6 +184,7 @@ class ServerInotify extends Process */ public function clearWatch() { + set_error_handler([$this, 'onErrorHandler']); foreach ($this->watchFiles as $wd) { try { inotify_rm_watch($this->inotify, $wd); @@ -195,6 +196,15 @@ class ServerInotify extends Process } } + /** + * + */ + protected function onErrorHandler() + { + $error = func_get_args(); + print_r($error[1] . ' ' . $error[2] . ':' . $error[3]); + } + /** * @param $dir