public function HudtException::__construct in Hook Update Deploy Tools 8
Same name and namespace in other branches
- 7 src/HudtException.php \HookUpdateDeployTools\HudtException::__construct()
Exception with optional watchdog logging on calling $e->logMessage().
Parameters
string $watchdog_message: Message ready for sending to t().
array $vars: Variables for use in string replacement in t().
int $watchdog_code: Watchdog error codes for proper watchdog logging.
bool $log_it: TRUE (default) to make a watchdog entry when $e->logMessage() is called. FALSE prevents watchdog entry when $e->logMessage() is called.
File
- src/
HudtException.php, line 27
Class
- HudtException
- Public method for importing Rules.
Namespace
HookUpdateDeployToolsCode
public function __construct($watchdog_message, $vars, $watchdog_code, $log_it = TRUE) {
$t = get_t();
// Assign properties from params.
$this->watchdogMessage = $watchdog_message;
$this->vars = (array) $vars;
$this->watchdogCode = $watchdog_code;
$this->logIt = !empty($log_it) ? TRUE : FALSE;
$this->message = $t($watchdog_message, $vars);
}