class ExceptionContextRegistry

Properties

protected bool $enabled
protected bool $recorderRegistered
protected null|ExceptionContext> $contexts

Methods

void
enable()

Enable exact exception-context handoff.

void
markRecorderRegistered()

Mark direct exception recording as registered on the exception handler.

bool
hasRecorder()

Determine whether direct exception recording is registered.

void
associate(Throwable $exception, ContextInterface $context, string|null $origin)

Associate an exception with the operation context that observed it.

take(Throwable $exception)

Take the operation context associated with an exception.

takeExact(Throwable $exception)

Take an exact exception-context association.

Details

at line 25
void enable()

Enable exact exception-context handoff.

Boot-only. The registry remains enabled for the worker lifetime.

Return Value

void

at line 35
void markRecorderRegistered()

Mark direct exception recording as registered on the exception handler.

Boot-only. The registration persists on the exception handler for the worker lifetime.

Return Value

void

at line 43
bool hasRecorder()

Determine whether direct exception recording is registered.

Return Value

bool

at line 51
void associate(Throwable $exception, ContextInterface $context, string|null $origin)

Associate an exception with the operation context that observed it.

Parameters

Throwable $exception
ContextInterface $context
string|null $origin

Return Value

void

at line 72
ExceptionContext|null take(Throwable $exception)

Take the operation context associated with an exception.

Parameters

Throwable $exception

Return Value

ExceptionContext|null

at line 86
protected ExceptionContext|null takeExact(Throwable $exception)

Take an exact exception-context association.

Parameters

Throwable $exception

Return Value

ExceptionContext|null