Better logging
This commit is contained in:
parent
fc0bf77ffe
commit
7d468475c0
|
|
@ -327,7 +327,7 @@ class CmsObject
|
|||
throw new ApplicationException(Lang::get('cms::lang.cms_object.error_creating_directory', ['name'=>$dirPath]));
|
||||
}
|
||||
|
||||
if (@file_put_contents($fullPath, $this->content) === false)
|
||||
if (@File::put($fullPath, $this->content) === false)
|
||||
throw new ApplicationException(Lang::get('cms::lang.cms_object.error_saving', ['name'=>$this->fileName]));
|
||||
|
||||
if (strlen($this->originalFileName) && $this->originalFileName !== $this->fileName) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
use URL;
|
||||
use App;
|
||||
use Log;
|
||||
use File;
|
||||
use View;
|
||||
use Lang;
|
||||
|
|
@ -329,7 +328,6 @@ class Controller extends BaseController
|
|||
return Response::make($responseContents, 406);
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
Log::error($ex);
|
||||
return Response::make($ex->getMessage(), 500);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php namespace System\Classes;
|
||||
|
||||
use App;
|
||||
use Log;
|
||||
use URL;
|
||||
use Lang;
|
||||
use Http;
|
||||
|
|
@ -10,7 +11,6 @@ use Carbon\Carbon;
|
|||
use System\Models\Parameters;
|
||||
use System\Models\PluginVersion;
|
||||
use System\Console\CacheClear;
|
||||
use System\Classes\SystemException;
|
||||
use System\Classes\ApplicationException;
|
||||
use October\Rain\Filesystem\Zip;
|
||||
use Exception;
|
||||
|
|
@ -474,7 +474,8 @@ class UpdateManager
|
|||
});
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
throw new SystemException(Lang::get('system::lang.server.connect_error'));
|
||||
Log::error($ex);
|
||||
throw new ApplicationException(Lang::get('system::lang.server.connect_error'));
|
||||
}
|
||||
|
||||
if ($result->code == 404)
|
||||
|
|
@ -522,7 +523,8 @@ class UpdateManager
|
|||
});
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
throw new SystemException(Lang::get('system::lang.server.connect_error'));
|
||||
Log::error($ex);
|
||||
throw new ApplicationException(Lang::get('system::lang.server.connect_error'));
|
||||
}
|
||||
|
||||
if ($result->code != 200)
|
||||
|
|
|
|||
Loading…
Reference in New Issue