Skip to content
Snippets Groups Projects
Commit 605050df authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Log exception at the catching code

parent 1a4465f4
No related branches found
No related tags found
No related merge requests found
...@@ -235,11 +235,11 @@ class OC_App{ ...@@ -235,11 +235,11 @@ class OC_App{
$info=OC_App::getAppInfo($app); $info=OC_App::getAppInfo($app);
$version=OC_Util::getVersion(); $version=OC_Util::getVersion();
if(!isset($info['require']) or !self::isAppVersionCompatible($version, $info['require'])) { if(!isset($info['require']) or !self::isAppVersionCompatible($version, $info['require'])) {
OC_Log::write('core', throw new \Exception(
'App "'.$info['name'].'" can\'t be installed because it is' $l->t("App \"%s\" can't be installed because it is not compatible with this version of ownCloud.",
.' not compatible with this version of ownCloud', array($info['name'])
OC_Log::ERROR); )
throw new \Exception($l->t("App can't be installed because it is not compatible with this version of ownCloud.")); );
}else{ }else{
OC_Appconfig::setValue( $app, 'enabled', 'yes' ); OC_Appconfig::setValue( $app, 'enabled', 'yes' );
if(isset($appdata['id'])) { if(isset($appdata['id'])) {
......
...@@ -7,5 +7,6 @@ try { ...@@ -7,5 +7,6 @@ try {
OC_App::enable(OC_App::cleanAppId($_POST['appid'])); OC_App::enable(OC_App::cleanAppId($_POST['appid']));
OC_JSON::success(); OC_JSON::success();
} catch (Exception $e) { } catch (Exception $e) {
OC_Log::write('core', $e->getMessage(), OC_Log::ERROR);
OC_JSON::error(array("data" => array("message" => $e->getMessage()) )); OC_JSON::error(array("data" => array("message" => $e->getMessage()) ));
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment