aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/bookmark/BookmarkFileService.php2
-rw-r--r--tests/bookmark/BookmarkFileServiceTest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/application/bookmark/BookmarkFileService.php b/application/bookmark/BookmarkFileService.php
index 0df2f47f..3ea98a45 100644
--- a/application/bookmark/BookmarkFileService.php
+++ b/application/bookmark/BookmarkFileService.php
@@ -106,7 +106,7 @@ class BookmarkFileService implements BookmarkServiceInterface
106 && $first->isPrivate() 106 && $first->isPrivate()
107 && (empty($privateKey) || $privateKey !== $first->getAdditionalContentEntry('private_key')) 107 && (empty($privateKey) || $privateKey !== $first->getAdditionalContentEntry('private_key'))
108 ) { 108 ) {
109 throw new Exception('Not authorized'); 109 throw new BookmarkNotFoundException();
110 } 110 }
111 111
112 return $first; 112 return $first;
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php
index 8e0ff8dd..f619aff3 100644
--- a/tests/bookmark/BookmarkFileServiceTest.php
+++ b/tests/bookmark/BookmarkFileServiceTest.php
@@ -886,8 +886,8 @@ class BookmarkFileServiceTest extends TestCase
886 */ 886 */
887 public function testFilterHashPrivateWhileLoggedOut() 887 public function testFilterHashPrivateWhileLoggedOut()
888 { 888 {
889 $this->expectException(\Exception::class); 889 $this->expectException(BookmarkNotFoundException::class);
890 $this->expectExceptionMessage('Not authorized'); 890 $this->expectExceptionMessage('The link you are trying to reach does not exist or has been deleted');
891 891
892 $hash = smallHash('20141125_084734' . 6); 892 $hash = smallHash('20141125_084734' . 6);
893 893