Log exception at the catching code
This commit is contained in:
parent
1a4465f41d
commit
605050df9b
2 changed files with 6 additions and 5 deletions
10
lib/app.php
10
lib/app.php
|
@ -235,11 +235,11 @@ class OC_App{
|
|||
$info=OC_App::getAppInfo($app);
|
||||
$version=OC_Util::getVersion();
|
||||
if(!isset($info['require']) or !self::isAppVersionCompatible($version, $info['require'])) {
|
||||
OC_Log::write('core',
|
||||
'App "'.$info['name'].'" can\'t be installed because it is'
|
||||
.' not compatible with this version of ownCloud',
|
||||
OC_Log::ERROR);
|
||||
throw new \Exception($l->t("App can't be installed because it is not compatible with this version of ownCloud."));
|
||||
throw new \Exception(
|
||||
$l->t("App \"%s\" can't be installed because it is not compatible with this version of ownCloud.",
|
||||
array($info['name'])
|
||||
)
|
||||
);
|
||||
}else{
|
||||
OC_Appconfig::setValue( $app, 'enabled', 'yes' );
|
||||
if(isset($appdata['id'])) {
|
||||
|
|
|
@ -7,5 +7,6 @@ try {
|
|||
OC_App::enable(OC_App::cleanAppId($_POST['appid']));
|
||||
OC_JSON::success();
|
||||
} catch (Exception $e) {
|
||||
OC_Log::write('core', $e->getMessage(), OC_Log::ERROR);
|
||||
OC_JSON::error(array("data" => array("message" => $e->getMessage()) ));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue