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


PHP ApplicationException::__construct方法代碼示例

本文整理匯總了PHP中ApplicationException::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ApplicationException::__construct方法的具體用法?PHP ApplicationException::__construct怎麽用?PHP ApplicationException::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ApplicationException的用法示例。


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

示例1: __construct

 public function __construct($errors = null, $message = null, $ApplicationExceptionType = null)
 {
     parent::__construct();
     $this->errors = $errors;
     $this->message = $message;
     $this->ApplicationExceptionType = $ApplicationExceptionType;
 }
開發者ID:sonicgd,項目名稱:google-adwords-api-light,代碼行數:7,代碼來源:ApiException.php

示例2: trim

		function __construct ($message, $code = E_USER_WARNING)
	 	{
	 		$message = trim($message, ".");
	 		$message = "Registry error: {$message}";
	 		$message = trim($message, ".");
	 		parent::__construct($message, $code);		
	 	}
開發者ID:rchicoria,項目名稱:epp-drs,代碼行數:7,代碼來源:class.RegistryException.php

示例3: __construct

 public function __construct()
 {
     $message = 'Unexpected case';
     $backtrace = debug_backtrace(0, 2);
     if (isset($backtrace[1]['class'])) {
         $message .= ' in ' . $backtrace[1]['class'] . '::' . $backtrace[1]['function'];
     }
     parent::__construct($message);
 }
開發者ID:extpoint,項目名稱:yii2-core,代碼行數:9,代碼來源:UnexpectedCaseException.php

示例4: __construct

 public function __construct(Controller $controller, $statusCode, $message = false)
 {
     $this->controller = $controller;
     $this->statusCode = $statusCode;
     if (!$message) {
         $action = $this->getController()->getRequest()->getControllerName() . '/' . $this->getController()->getRequest()->getActionName();
         $code = $this->getStatusCode() . ' (' . self::getCodeMeaning($this->getStatusCode()) . ')';
         $message = "Error accessing {$action}.\n {$code}";
     }
     parent::__construct($message);
 }
開發者ID:saiber,項目名稱:www,代碼行數:11,代碼來源:HTTPStatusException.php

示例5: __construct

 public function __construct($errors = null, $message = null)
 {
     parent::__construct();
     $this->errors = $errors;
     $this->message = $message;
 }
開發者ID:stevenmaguire,項目名稱:googleads-php-lib,代碼行數:6,代碼來源:LineItemService.php

示例6: __construct

 public function __construct($errors = NULL, $message = NULL, $ApplicationExceptionType = NULL)
 {
     if (get_parent_class('ApiException')) {
         parent::__construct();
     }
     $this->errors = $errors;
     $this->message = $message;
     $this->ApplicationExceptionType = $ApplicationExceptionType;
 }
開發者ID:josephbergdoll,項目名稱:berrics,代碼行數:9,代碼來源:CustomFieldService.php

示例7:

 /**
  * @param string $argumentName
  * @param string $message
  */
 function __construct($argumentName, $message)
 {
     Assert::isScalar($argumentName);
     parent::__construct($message);
     $this->argumentName = $argumentName;
 }
開發者ID:phoebius,項目名稱:phoebius,代碼行數:10,代碼來源:ArgumentException.class.php

示例8:

 function __construct($message, $code = null)
 {
     // Call ApplicationException constructor
     parent::__construct("Licensing error: {$message}");
 }
開發者ID:rchicoria,項目名稱:epp-drs,代碼行數:5,代碼來源:class.LicensingException.php

示例9: trim

		function __construct ($message, $code = null)
	 	{
	 		$message = trim($message, ".");
	 		$message = "{$message}. Please consult API documentation.";
	 		parent::__construct($message, $code);		
	 	}
開發者ID:rchicoria,項目名稱:epp-drs,代碼行數:6,代碼來源:class.APIException.php

示例10: __construct

 /**
  * @param \yii\base\Model $model
  */
 public function __construct($model)
 {
     $this->errors = $model->errors;
     parent::__construct('Cannot save model ' . $model->className() . ', errors: ' . print_r($this->errors, true));
 }
開發者ID:extpoint,項目名稱:yii2-core,代碼行數:8,代碼來源:ModelSaveException.php

示例11: __construct

 /**
  * @inheritdoc
  */
 public function __construct()
 {
     parent::__construct('The occurred code block is not implemented and a placeholder error is currently put in place.');
 }
開發者ID:phabitat,項目名稱:exceptional,代碼行數:7,代碼來源:NotImplementedException.php

示例12: __construct

 /**
  * @param string $controller Controllers name
  */
 public function __construct($controllerName)
 {
     parent::__construct("Specified controller ({$controllerName}) does not exist");
     $this->controllerName = $controllerName;
 }
開發者ID:saiber,項目名稱:www,代碼行數:8,代碼來源:ControllerNotFoundException.php


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