-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/** | ||
* @link https://craftcms.com/ | ||
* @copyright Copyright (c) Pixel & Tonic, Inc. | ||
* @license https://craftcms.github.io/license/ | ||
*/ | ||
|
||
namespace craft\errors; | ||
|
||
use Throwable; | ||
use yii\base\Exception; | ||
|
||
/** | ||
* Deprecation Error Exception | ||
* | ||
* @author Pixel & Tonic, Inc. <[email protected]> | ||
* @since 3.1.18 | ||
*/ | ||
class DeprecationException extends Exception | ||
{ | ||
/** | ||
* @var string|null The file the deprecation warning occurred in | ||
*/ | ||
public $file; | ||
|
||
/** | ||
* @var int|null The line number the deprecation warning occurred on | ||
*/ | ||
public $line; | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param string|null $message | ||
* @param string|null $file | ||
* @param int|null $line | ||
* @param int $code | ||
* @param Throwable|null $previous | ||
*/ | ||
public function __construct(string $message = null, string $file = null, int $line = null, int $code = 0, Throwable $previous = null) | ||
{ | ||
$this->file = $file; | ||
$this->line = $line; | ||
|
||
parent::__construct($message, $code, $previous); | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function getName() | ||
{ | ||
return 'Deprecation Error'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters