Handle errors from doTransform()

https://github.com/sonata-project/SonataMediaBundle/issues/384