From 738b78f1b0eec61f4a55dd356d6b6a541ff56246 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 18 Jun 2015 12:46:52 +0200 Subject: Use \OC\HintException and translate the hint --- core/ajax/share.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/ajax') 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()))); } -- cgit v1.2.3