/**
  * Constructs a new eZDFSFileHandlerTableNotFoundException
  *
  * @param string $sql The SQL query
  * @param string $error The SQL error message
  * @return void
  */
 function __construct( $sql, $error )
 {
     $message = "Table not found when executing SQL '$sql' ".
                "(error message: $error).\n" .
                "Please review the cluster tables installation or configuration";
     parent::__construct( $message );
 }
Example #2
0
 /**
  * Constructs a new ezcBaseAutoloadException for the $className that was
  * searched for in the autoload files $fileNames from the directories
  * specified in $dirs.
  *
  * @param string $className
  * @param array(string) $files
  * @param array(ezcBaseRepositoryDirectory) $dirs
  */
 function __construct($className, $files, $dirs)
 {
     $paths = array();
     foreach ($dirs as $dir) {
         $paths[] = realpath($dir->autoloadPath);
     }
     parent::__construct("Could not find a class to file mapping for '{$className}'. Searched for " . implode(', ', $files) . " in: " . implode(', ', $paths));
 }
Example #3
0
 /**
  * Constructs a new ezcBaseExtensionNotFoundException.
  *
  * @param string $name The name of the extension
  * @param string $version The version of the extension
  * @param string $message Additional text
  */
 function __construct($name, $version = null, $message = null)
 {
     if ($version === null) {
         parent::__construct("The extension '{$name}' could not be found. {$message}");
     } else {
         parent::__construct("The extension '{$name}' with version '{$version}' could not be found. {$message}");
     }
 }
Example #4
0
 /**
  * Constructs a new ezcBaseValueException on the $name variable.
  *
  * @param string  $settingName The name of the setting where something was
  *                wrong with.
  * @param mixed   $value The value that the option was tried to be set too.
  * @param string  $expectedValue A string explaining the allowed type and value range.
  * @param string  $variableType  What type of variable was tried to be set (setting, argument).
  */
 function __construct($settingName, $value, $expectedValue = null, $variableType = 'setting')
 {
     $type = gettype($value);
     if (in_array($type, array('array', 'object', 'resource'))) {
         $value = serialize($value);
     }
     $msg = "The value '{$value}' that you were trying to assign to {$variableType} '{$settingName}' is invalid.";
     if ($expectedValue) {
         $msg .= " Allowed values are: " . $expectedValue . '.';
     }
     parent::__construct($msg);
 }
 /**
  * Constructs a new ezcLogWriterException with the original exception $e.
  *
  * @param Exception $e
  */
 public function __construct(Exception $e)
 {
     $this->exception = $e;
     parent::__construct($e->getMessage());
 }
Example #6
0
 /**
  * Constructs a new ezcBaseWhateverException.
  *
  * @param string $what  What happened?
  * @param string $where Where did it happen?
  * @param string $who   Who is responsible?
  * @param string $why   Why did is happen?
  * @access protected
  * @return void
  */
 function __construct($what, $where, $who, $why)
 {
     parent::__construct("Thanks for using eZ components. Hope you like it! Greetings from Amos, Derick, El Frederico, Ray and Toby.");
 }
 /**
  * Constructs a new eZDFSFileHandlerNFSMountPointNotFoundException
  *
  * @param string $path the mount point path
  * @return void
  */
 function __construct($path)
 {
     parent::__construct("Local DFS mount point '{$path}' is not writeable");
 }
Example #8
0
 public function __construct($itemType, $itemValue)
 {
     $this->itemType = $itemType;
     $this->itemValue = $itemValue;
     parent::__construct("The requested {$itemType} item with ID {$itemValue} was not found");
 }
Example #9
0
 public function __construct($url, $body)
 {
     $this->url = $url;
     $this->body = $body;
     parent::__construct("An error occured while parsing the fetched HTML");
 }
Example #10
0
 /**
  * Constructs a new ezcLogWrongSeverityException for severity $severity
  *
  * @param string $severity
  */
 public function __construct($severity)
 {
     parent::__construct("There is no severity named '{$severity}'.");
 }
 /**
  * Constructs a new ezcReflectionCallToUndefinedMethodException.
  *
  * @param string $class
  * @param string $method
  * @return void
  */
 function __construct($class, $method)
 {
     // TODO One could obtain a stacktrace and report file and line of the invocation
     parent::__construct("Call to undefined method '{$class}::{$method}'.");
 }
Example #12
0
 public function __construct( $url, $http_response_headers )
 {
     $this->url = $url;
     $this->http_response_headers = $http_response_headers;
     parent::__construct( "An HTTP error code was returned while fetching URL '$url'. Response headers: " . print_r( $http_response_headers, true ) );
 }
 /**
  * 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}'.");
 }
Example #14
0
 /**
  * Constructs a new ezcBaseSettingNotFoundException for $settingName.
  *
  * @param string $settingName The name of the setting that does not exist.
  */
 function __construct($settingName)
 {
     parent::__construct("The setting '{$settingName}' is not a valid configuration setting.");
 }
 /**
  * Constructs a new ezcBaseDoubleClassRepositoryPrefixException for the
  * $prefix that points to $basePath with autoload directory
  * $autoloadDirPath.
  *
  * @param string $prefix
  * @param string $basePath
  * @param string $autoloadDirPath
  */
 function __construct($prefix, $basePath, $autoloadDirPath)
 {
     parent::__construct("The class repository in '{$basePath}' (with autoload dir '{$autoloadDirPath}') can not be added because another class repository already uses the prefix '{$prefix}'.");
 }
 /**
  * Constructs a new eZDFSFileHandlerNFSMountPointNotFoundException
  *
  * @param string $host The hostname
  * @param string $user The username
  * @param string $pass The password (will be displayed as *)
  * @return void
  */
 function __construct($path)
 {
     parent::__construct("Local DFS mount point '{$path}' does not exist");
 }
 /**
  * Constructs a new ymcDatatypeException with message $msg.
  *
  * @param string $msg Error message.
  */
 public function __construct($msg)
 {
     parent::__construct($msg);
 }
Example #18
0
 /**
  * Constructs a new ezcBasePropertyNotFoundException for the property
  * $name.
  *
  * @param string $name The name of the property
  */
 function __construct($name)
 {
     parent::__construct("No such property name '{$name}'.");
 }
Example #19
0
 public function __construct($url, $http_response_headers)
 {
     $this->url = $url;
     $this->http_response_headers = $http_response_headers;
     parent::__construct("An HTTP error code was returned while fetching URL '{$url}'");
 }
 /**
  * Constructs a new ezcBaseInitInvalidCallbackClassException for the $callbackClass.
  *
  * @param string $callbackClass
  * @return void
  */
 function __construct($callbackClass)
 {
     parent::__construct("Class '{$callbackClass}' does not exist, or does not implement the 'ezcBaseConfigurationInitializer' interface.");
 }
 /**
  * Constructs a new ezcPersistentObjectException with error message $message and reason code $reason.
  *
  * Reason can be omitted if not applicable.
  *
  * @param string $message
  * @param string $reason
  * @return void
  */
 public function __construct($message, $reason = null)
 {
     $message = $reason !== null ? "{$message} ({$reason})" : $message;
     parent::__construct($message);
 }
Example #22
0
 /**
  * Constructs a new ezcPropertyPermissionException for the property $name.
  *
  * @param string $name The name of the property.
  * @param int    $mode The mode of the property that is allowed (::READ or ::WRITE).
  */
 function __construct($name, $mode)
 {
     parent::__construct("The property '{$name}' is " . ($mode == self::READ ? "read" : "write") . "-only.");
 }
 /**
  * Constructs a new ezcBaseInitCallbackConfiguredException.
  *
  * @param string $identifier
  * @param string $originalCallbackClassName
  */
 function __construct($identifier, $originalCallbackClassName)
 {
     parent::__construct("The '{$identifier}' is already configured with callback class '{$originalCallbackClassName}'.");
 }
Example #24
0
 public function __construct( $command )
 {
     parent::__construct( "Command already queued: $command" );
 }
 /**
  * Constructs an ezcBaseInvalidParentClassException for custom class $customClass
  *
  * @param string $expectedParentClass
  * @param string $customClass
  */
 function __construct($expectedParentClass, $customClass)
 {
     parent::__construct("Class '{$customClass}' does not exist, or does not inherit from the '{$expectedParentClass}' class.");
 }
 /**
  * Constructs a new ezcBaseFunctionalityNotSupportedException.
  *
  * @param string $message The message to throw
  * @param string $reason The reason for the exception
  */
 function __construct($message, $reason)
 {
     parent::__construct("{$message} is not supported. Reason: {$reason}.");
 }
 /**
  * Constructs a new ezcTemplateException with error message $message.
  *
  * @param string $message
  */
 public function __construct($message)
 {
     parent::__construct($message);
 }
Example #28
0
 public function __construct($url)
 {
     $this->url = $url;
     parent::__construct("A network error has occured fetching URL '{$url}'");
 }