[BUGFIX] Image rendering of non-existing files throws exception 68/19168/3
authorOliver Hader <oliver@typo3.org>
Fri, 22 Mar 2013 09:31:29 +0000 (10:31 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 27 Mar 2013 19:09:55 +0000 (20:09 +0100)
commit1e1c26a7fcf059ba92e4291b9563cb01ea2592d1
tree140e023b190ad062940bbfed968b889b4414c1ad
parent7aca24d81018569e8757c2540d8107cebe24c40b
[BUGFIX] Image rendering of non-existing files throws exception

Rendering an image that has no accordant file in a storage in
the frontend (e.g. in TypoScript) fails with an exception like
"Object with identifier xyz does not exist in storage".

A new ResourceDoesNotExistException is introduced to cover
files and folders and is thrown instead of RuntimeException.
This way, the exception is caught in the ContentObjectRenderer
and the frontend rendering just does not output the error,
which is logged instead.

Change-Id: I0affa15a8f0a50bf30a7176972994f209d18daf4
Fixes: #46535
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/19168
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/core/Classes/Resource/Exception/FileDoesNotExistException.php
typo3/sysext/core/Classes/Resource/Exception/FolderDoesNotExistException.php
typo3/sysext/core/Classes/Resource/Exception/ResourceDoesNotExistException.php [new file with mode: 0644]
typo3/sysext/core/Classes/Resource/ResourceFactory.php