wi-adrema-plugin/exceptions/ComponentException.php

20 lines
425 B
PHP
Raw Normal View History

2024-02-01 00:23:58 +01:00
<?php
namespace Silva\Adrema\Exceptions;
use App;
use ApplicationException;
use Lang;
use Throwable;
class ComponentException extends ApplicationException
{
public function __construct($message = "", $code = 0, Throwable $previous = null)
{
2024-06-26 14:47:49 +02:00
$translations = include(__DIR__ . '/../lang/en/lang.php');
2024-02-01 00:23:58 +01:00
parent::__construct($translations['errors.' . $message] ?? $message, $code, $previous);
}
}