/**
  * Creates a new ezcImageHandlerNotAvailableException.
  * 
  * @param string $handlerClass Name of the affected class.
  * @param string $reason       Reason why it is not available.
  * @return void
  */
 function __construct($handlerClass, $reason = null)
 {
     $reasonPart = "";
     if ($reason) {
         $reasonPart = " {$reason}";
     }
     parent::__construct("Handler class '{$handlerClass}' not found.{$reasonPart}");
 }
 /**
  * Creates a new ezcImageFileNotProcessableException.
  * 
  * @param string $file   The not processable file.
  * @param string $reason The reason why the file could not be processed.
  * @return void
  */
 function __construct($file, $reason = null)
 {
     $reasonPart = "";
     if ($reason) {
         $reasonPart = " {$reason}";
     }
     parent::__construct("File '{$file}' could not be processed.{$reasonPart}");
 }
 /**
  * Creates a new ezcImageFilterFailedException.
  * 
  * @param string $filterName The failed filter.
  * @param string $reason     The reason why the filter failed.
  * @return void
  */
 function __construct($filterName, $reason = null)
 {
     $reasonPart = "";
     if ($reason) {
         $reasonPart = " {$reason}";
     }
     parent::__construct("The filter '{$filterName}' failed.{$reasonPart}");
 }
 /**
  * Creates a new ezcImageInvalidReferenceException.
  * 
  * @param string $reason The reason.
  * @return void
  */
 function __construct($reason = null)
 {
     $reasonPart = "";
     if ($reason) {
         $reasonPart = " {$reason}";
     }
     parent::__construct("No valid reference found for action.{$reasonPart}");
 }
 /**
  * Creates a new ezcImageInvalidFilterParameterException.
  * 
  * @param string $filterName    Name of the filter.
  * @param string $parameterName Affected parameter.
  * @param string $actualValue   Received value.
  * @param string $expectedRange Expected value range.
  * @return void
  */
 function __construct($filterName, $parameterName, $actualValue, $expectedRange = null)
 {
     $actualValue = var_export($actualValue, true);
     $message = "Wrong value '{$actualValue}' submitted for parameter '{$parameterName}' of filter '{$filterName}'.";
     if ($expectedRange !== null) {
         $message .= " Expected parameter to be in range '{$expectedRange}'.";
     }
     parent::__construct($message);
 }
 /**
  * Creates a new ezcImageTransformationAlreadyExistsException.
  * 
  * @param string $name Name of the collision transformation.
  * @return void
  */
 function __construct($name)
 {
     parent::__construct("Transformation '{$name}' already exists.");
 }
 /**
  * Creates a new ezcImageFilterNotAvailableException.
  * 
  * @param string $filterName The affected filter.
  * @return void
  */
 function __construct($filterName)
 {
     parent::__construct("Filter '{$filterName}' does not exist.");
 }
 /**
  * Creates a new ezcImageFileNameInvalidException.
  * 
  * @param string $file The invalid file name.
  * @return void
  */
 function __construct($file)
 {
     parent::__construct("The file name '{$file}' contains an illegal character (', \", \$).");
 }
 /**
  * Creates a new ezcImageTransformationNotAvailableException.
  * 
  * @param string $name Name of the missing transformation.
  * @return void
  */
 function __construct($name)
 {
     parent::__construct("Transformation '{$name}' does not exists.");
 }
 /**
  * Creates a new ezcImageHandlerSettingsInvalidException.
  * 
  * @return void
  */
 function __construct()
 {
     parent::__construct("Invalid handler settings.");
 }
 /**
  * Creates a new ezcImageMissingFilterParameterException.
  * 
  * @param string $filterName    Affected filter.
  * @param string $parameterName Affected parameter.
  * @return void
  */
 function __construct($filterName, $parameterName)
 {
     parent::__construct("The filter '{$filterName}' expects a parameter called '{$parameterName}' which was not submitted.");
 }
 /**
  * Creates a new ezcImageTransformationException using a parent exception. 
  * Creates a new ezcImageTransformationException and appends an existing
  * exception to it. The ezcImageTransformationException is just the catch-
  * all container. The parent is stored for logging/debugging purpose.
  * 
  * @param ezcBaseException $e Any exception that may occur during
  *                            transformation.
  */
 public function __construct(ezcBaseException $e)
 {
     $this->parent = $e;
     $message = $e->getMessage();
     parent::__construct("Transformation failed. '{$message}'.");
 }
 /**
  * Creates a new ezcImageMimeTypeUnsupportedException.
  * 
  * @param string $mimeType  Affected mime type.
  * @param string $direction "input" or "output".
  * @return void
  */
 function __construct($mimeType, $direction)
 {
     parent::__construct("Converter does not support MIME type '{$mimeType}' for '{$direction}'.");
 }