當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ezcBaseException類代碼示例

本文整理匯總了PHP中ezcBaseException的典型用法代碼示例。如果您正苦於以下問題:PHP ezcBaseException類的具體用法?PHP ezcBaseException怎麽用?PHP ezcBaseException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ezcBaseException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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}'.");
 }
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:15,代碼來源:transformation.php

示例2:

 /**
  * 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 );
 }
開發者ID:robinmuilwijk,項目名稱:ezpublish,代碼行數:14,代碼來源:table_not_found.php

示例3: array

 /**
  * 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));
 }
開發者ID:fobiaweb,項目名稱:ezc-base,代碼行數:17,代碼來源:autoload.php

示例4:

 /**
  * 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}");
     }
 }
開發者ID:kidaa30,項目名稱:yes,代碼行數:15,代碼來源:extension_not_found.php

示例5: gettype

 /**
  * 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);
 }
開發者ID:Adeelgill,項目名稱:livehelperchat,代碼行數:21,代碼來源:value.php

示例6: __construct

 /**
  * Constructs a new ezcLogWriterException with the original exception $e.
  *
  * @param Exception $e
  */
 public function __construct(Exception $e)
 {
     $this->exception = $e;
     parent::__construct($e->getMessage());
 }
開發者ID:brookinsconsulting,項目名稱:ezecosystem,代碼行數:10,代碼來源:writer_exception.php

示例7:

 /**
  * 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.");
 }
開發者ID:Sajaki,項目名稱:customisation-db,代碼行數:14,代碼來源:whatever.php

示例8:

 /**
  * 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");
 }
開發者ID:runelangseid,項目名稱:ezpublish,代碼行數:10,代碼來源:mount_point_not_writeable.php

示例9: __construct

 public function __construct($itemType, $itemValue)
 {
     $this->itemType = $itemType;
     $this->itemValue = $itemValue;
     parent::__construct("The requested {$itemType} item with ID {$itemValue} was not found");
 }
開發者ID:bdunogier,項目名稱:tcl,代碼行數:6,代碼來源:scraper_not_found.php

示例10: __construct

 public function __construct($url, $body)
 {
     $this->url = $url;
     $this->body = $body;
     parent::__construct("An error occured while parsing the fetched HTML");
 }
開發者ID:bdunogier,項目名稱:tcl,代碼行數:6,代碼來源:scraper_html.php

示例11: __construct

 /**
  * Constructs a new ezcLogWrongSeverityException for severity $severity
  *
  * @param string $severity
  */
 public function __construct($severity)
 {
     parent::__construct("There is no severity named '{$severity}'.");
 }
開發者ID:jacomyma,項目名稱:GEXF-Atlas,代碼行數:9,代碼來源:wrong_severity.php

示例12:

 /**
  * 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}'.");
 }
開發者ID:naderman,項目名稱:ezc-reflection,代碼行數:12,代碼來源:call_to_undefined_method.php

示例13: __construct

 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 ) );
 }
開發者ID:rangulicon,項目名稱:mkvmanager,代碼行數:6,代碼來源:scraper_http.php

示例14:

 /**
  * 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.");
 }
開發者ID:corcre,項目名稱:elabftw,代碼行數:9,代碼來源:setting_not_found.php

示例15:

 /**
  * 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}'.");
 }
開發者ID:jkimdon,項目名稱:cohomeals,代碼行數:13,代碼來源:double_class_repository_prefix.php


注:本文中的ezcBaseException類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。