class BackupMigrateException in Backup and Migrate 5.0.x
@package Drupal\backup_migrate\Core\Exception
Hierarchy
- class \Drupal\backup_migrate\Core\Exception\BackupMigrateException extends \Exception
Expanded class hierarchy of BackupMigrateException
8 files declare their use of BackupMigrateException
- BackupMigrate.php in src/
Core/ Main/ BackupMigrate.php - DrupalDirectoryDestination.php in src/
Drupal/ Destination/ DrupalDirectoryDestination.php - FileDirectorySource.php in src/
Core/ Source/ FileDirectorySource.php - MySQLiSource.php in src/
Core/ Source/ MySQLiSource.php - Schedule.php in src/
Entity/ Schedule.php
File
- src/
Core/ Exception/ BackupMigrateException.php, line 12
Namespace
Drupal\backup_migrate\Core\ExceptionView source
class BackupMigrateException extends Exception {
protected $replacement = [];
protected $messageRaw = 'Unknown exception';
/**
* Construct the exception. Note: The message is NOT binary safe.
*
* @link http://php.net/manual/en/exception.construct.php
*
* @param string $message
* [optional] The Exception message to throw.
* @param array $replacement
* [optional] Untranslatable values to replace into the string.
* @param int $code
* [optional] The Exception code.
*/
public function __construct($message = NULL, array $replacement = [], $code = 0) {
$this->replacement = $replacement;
$this->messageRaw = $message;
// Send the replaced message to the parent constructor to act as normal in
// most cases.
parent::__construct(strtr($message, $replacement), $code);
}
/**
* Get the unmodified message with replacement tokens.
*
* @return null|string
*/
public function getMessageRaw() {
return $this->messageRaw;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BackupMigrateException:: |
protected | property | ||
BackupMigrateException:: |
protected | property | ||
BackupMigrateException:: |
public | function | Get the unmodified message with replacement tokens. | |
BackupMigrateException:: |
public | function | Construct the exception. Note: The message is NOT binary safe. |