Skip to content

Commit 1e248c8

Browse files
authored
Merge pull request #7880 from cakephp/ADmad-patch-1
Fix exception class
2 parents 3a1a9d8 + e00adb0 commit 1e248c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

en/tutorials-and-examples/cms/articles-controller.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ While this is a simple action, we've used some powerful CakePHP features. We
137137
start our action off by using ``findBySlug()`` which is
138138
a :ref:`Dynamic Finder <dynamic-finders>`. This method allows us to create a basic query that
139139
finds articles by a given slug. We then use ``firstOrFail()`` to either fetch
140-
the first record, or throw a ``NotFoundException``.
140+
the first record, or throw a ``\Cake\Datasource\Exception\RecordNotFoundException``.
141141

142142
Our action takes a ``$slug`` parameter, but where does that parameter come from?
143143
If a user requests ``/articles/view/first-post``, then the value 'first-post' is
@@ -359,7 +359,7 @@ now. Add the following action to your ``ArticlesController``::
359359

360360
This action first ensures that the user has tried to access an existing record.
361361
If they haven't passed in an ``$slug`` parameter, or the article does not exist,
362-
a ``NotFoundException`` will be thrown, and the CakePHP ErrorHandler will render
362+
a ``RecordNotFoundException`` will be thrown, and the CakePHP ErrorHandler will render
363363
the appropriate error page.
364364

365365
Next the action checks whether the request is either a POST or a PUT request. If

0 commit comments

Comments
 (0)