Documentations › mmo.core › php › exceptions eServer MMO\core\exceptions · 1 symbol · generated 30 Sep 2026
Base exception for a failure that occurred while handling an HTTP request, carrying that request alongside the usual tException message/context/origin.
class MMO\core\exceptions\eServer extends MMO\core\exceptions\eRuntime
implements Psr\Http\Client\ClientExceptionInterface Namespace MMO\core\exceptionsExtends eRuntime Implements ClientExceptionInterfacethrow new eServer($this, $route, 'upstream service unavailable.', [], null, 503);
Methods2 function getRequest(): Psr\Http\Message\RequestInterface returns RequestInterfacethe request that was being handled when this exception was thrown
__construct($origin, $request, $message, $context, $previous, $code) eServer.php:24 function __construct(
object|string $origin,
Psr\Http\Message\RequestInterface|MMO\core\server\Route $request,
string $message,
array $context = [],
?Throwable $previous = null,
int $code = 500
) $origin object | string the exception origin (object throwing) $request RequestInterface | Route the request being handled when the error occurred (a Route is resolved to its underlying request via Route::getRequest()) $message string the message. Can contain placeholders {xxx} replaced by values in context. {origin} is replaced by $origin. $context = [] array the message context. $previous = null null | Throwable $code = 500 int the HTTP status code this exception maps to
Inherited members (29) Methods Declared by Description AddListener($handler, $order)eRuntime Register a listener directly (as opposed to ConnectListeners 's attribute-based discovery). ConnectListeners($obj)eRuntime Scan $obj's methods for #[Listen(EventClass::class)] attributes and register each one as a listener on the matching event class. DisconnectListeners($obj)eRuntime Undo a previous ConnectListeners : removes every listener that connect had registered for $obj on this event class. dispatch()eRuntime Invoke every GetListeners listener with $this. getCode()Exception getContext()eRuntime getFile()Exception getFormat()eRuntime getLine()Exception GetListeners()eRuntime Collect every listener for this class, including those registered on its parent classes (so a subclass event is also caught by listeners of its parent event), sorted by ascending $order (ties keep … getMessage()Exception getOrigin()eRuntime getPrevious()Exception getTrace()Exception getTraceAsString()Exception HasListener($handler)eRuntime jsonSerialize()eRuntime \JsonSerializable::jsonSerialize RemoveListener($handler)eRuntime Remove the last added handler from the listeners. Send($args)eRuntime Construct a new instance of this class with $args, then dispatch it to every listener. SetListenerOrder($handler, $order)eRuntime Change the order of an already-registered listener, whether added directly via AddListener or indirectly via ConnectListeners (which also stores its [$obj, $methodName] callables here). __toString()Exception __wakeup()Exception