]> source.dussan.org Git - nextcloud-server.git/commitdiff
Log exception at the catching code
authorkondou <kondou@ts.unde.re>
Fri, 9 Aug 2013 16:01:49 +0000 (18:01 +0200)
committerkondou <kondou@ts.unde.re>
Fri, 9 Aug 2013 16:01:49 +0000 (18:01 +0200)
lib/app.php
settings/ajax/enableapp.php

index 1ff18c799cb9e2b04913d5b1fff66333409ec359..8ac4a16ffd07578d8185fb7a810179e14bf82417 100644 (file)
@@ -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'])) {
index 0784736a65530b82cb01dbeed5cfb781893469bb..735794360b33eba5c9b7bfeabd777e9570176431 100644 (file)
@@ -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()) ));
 }