summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-06-18 12:46:52 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-06-22 15:34:06 +0200
commit738b78f1b0eec61f4a55dd356d6b6a541ff56246 (patch)
treecba20da65582db0e389c2b7017c4ffd0a49ff7f5 /core
parent2b7e5f841a016e8682d560643dce4797758a44c3 (diff)
downloadnextcloud-server-738b78f1b0eec61f4a55dd356d6b6a541ff56246.tar.gz
nextcloud-server-738b78f1b0eec61f4a55dd356d6b6a541ff56246.zip
Use \OC\HintException and translate the hint
Diffstat (limited to 'core')
-rw-r--r--core/ajax/share.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php
index e78d274815d..4de76b460cf 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -66,6 +66,8 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
} else {
OC_JSON::success();
}
+ } catch (\OC\HintException $exception) {
+ OC_JSON::error(array('data' => array('message' => $exception->getHint())));
} catch (Exception $exception) {
OC_JSON::error(array('data' => array('message' => $exception->getMessage())));
}