File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,21 @@ The :class:`Symfony\\Component\\Filesystem\\Filesystem` class is the unique
21
21
endpoint for filesystem operations::
22
22
23
23
use Symfony\Component\Filesystem\Filesystem;
24
- use Symfony\Component\Filesystem\Exception\IOException ;
24
+ use Symfony\Component\Filesystem\Exception\IOExceptionInterface ;
25
25
26
26
$fs = new Filesystem();
27
27
28
28
try {
29
29
$fs->mkdir('/tmp/random/dir/' . mt_rand());
30
- } catch (IOException $e) {
30
+ } catch (IOExceptionInterface $e) {
31
31
echo "An error occurred while creating your directory at ".$e->getPath();
32
32
}
33
33
34
+ .. versionadded ::
35
+
36
+ The ``IOExceptionInterface `` and its ``getPath `` method are new in Symfony
37
+ 2.4. Prior to 2.4, you would catch the ``IOException `` class.
38
+
34
39
.. note ::
35
40
36
41
Methods :method: `Symfony\\ Component\\ Filesystem\\ Filesystem::mkdir `,
@@ -251,7 +256,7 @@ Error Handling
251
256
--------------
252
257
253
258
Whenever something wrong happens, an exception implementing
254
- :class: `Symfony\\ Component\\ Filesystem\\ Exception\\ ExceptionInterface ` and
259
+ :class: `Symfony\\ Component\\ Filesystem\\ Exception\\ ExceptionInterface ` or
255
260
:class: `Symfony\\ Component\\ Filesystem\\ Exception\\ IOExceptionInterface ` is thrown.
256
261
257
262
.. note ::
You can’t perform that action at this time.
0 commit comments