wi-adrema-plugin/exceptions/ComponentException.php

20 lines
425 B
PHP

<?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)
{
$translations = include(__DIR__ . '/../lang/en/lang.php');
parent::__construct($translations['errors.' . $message] ?? $message, $code, $previous);
}
}