Nexus API Reference

ExceptionMapperRegistry
in package

FinalYes
Tags
psalm-api

Registered mappers from exception class to ResponseInterface. Walk order: class → parents → interfaces. First exact-class match wins; otherwise the first ancestor or interface that has a registered mapper wins.

Table of Contents

Methods

has()  : bool
map()  : ResponseInterface
register()  : void

Methods

has()

public has(string $exceptionClass) : bool
Parameters
$exceptionClass : string
Return values
bool

map()

public map(Throwable $e, ServerRequestInterface $r) : ResponseInterface
Parameters
$e : Throwable
$r : ServerRequestInterface
Return values
ResponseInterface

register()

public register(TException> $exceptionClass, callable(TException, ServerRequestInterface): ResponseInterface $mapper) : void
Parameters
$exceptionClass : TException>
$mapper : callable(TException, ServerRequestInterface): ResponseInterface
Tags
template

TException of Throwable


        
On this page

Search results