<?php namespace Modules\Common\Exceptions; use Throwable; class CommonBusinessException extends \RuntimeException { public function __construct($message = "", $code = 0, Throwable $previous = null) { parent::__construct($message, $code, $previous); } public static function throwError($error, Throwable $previous = null) { throw (new static($error[1], $error[0], $previous)); } }