summaryrefslogtreecommitdiffstats
path: root/lib/private/share
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/share')
-rw-r--r--lib/private/share/share.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 3751b035bd4..fe756b5ae7f 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -477,9 +477,10 @@ class Share extends \OC\Share\Constants {
if ($itemType === 'file' or $itemType === 'folder') {
$path = \OC\Files\Filesystem::getPath($itemSource);
if (!$path) {
- $message = 'Sharing ' . $itemSourceName . ' failed, because the file does not exist';
- \OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
- throw new \Exception($message);
+ $message = 'Sharing %s failed, because the file does not exist';
+ $message_t = $l->t('Sharing %s failed, because the file does not exist', array($itemSourceName));
+ \OC_Log::write('OCP\Share', sprintf($message, $itemSourceName), \OC_Log::ERROR);
+ throw new \Exception($message_t);
}
}