<?php
namespace ModulesAbstract\FileExplorer;

class ThumbCreatorModel extends \Engine\GenDocument\Image\ThumbnailCreator
{
	/**
	 * (non-PHPdoc)
	 * @see \Engine\GenDocument\Image\ThumbnailCreator::createThumbnail()
	 */
	protected function createThumbnail($source, $dest)
	{
		// wrap exception, re-send them as ModelException
		try {
			return parent::createThumbnail($source, $dest);
		}
		catch (\Engine\GenDocument\Image\Exception $ex) {
			throw new \Engine\Mvc\ModelException("Error while processing image", 0, $ex);
		}
	}
}