Issue Bug Closed

#46535Image rendering of non-existing files throws exception

Oliver Hader 03/22/13, 10:24 updated 10/23/17, 22:16

Description

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” (1329647780).

Sure, the file does not exist in that case, but throwing an exception that is not caught is too much.
Besides that $cObj->getImgResource() already catches \TYPO3\CMS\Core\Resource\Exception – which does not cover RuntimeExceptions.

Solution:
Throw a \TYPO3\CMS\Core\Resource\Exception instead of a RuntimeException in these cases. A new ResourceDoesNotExistException is introduced to cover files and folders.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.