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 26
void enable()

Enable exact exception-context handoff.

The shared registry remains enabled for the worker lifetime.

Return Value

void

at line 39
void markRecorderRegistered()

Mark direct exception recording as registered on the exception handler.

On the shared registry, the mark persists for the worker lifetime and lets the log handler defer exceptions currently being reported by the exception handler to the direct recorder.

Return Value

void

at line 48
bool hasRecorder()

Determine whether direct exception recording is registered.

Return Value

bool

at line 56
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 77
ExceptionContext|null take(Throwable $exception)

Take the operation context associated with an exception.

Parameters

Throwable $exception

Return Value

ExceptionContext|null

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

Take an exact exception-context association.

Parameters

Throwable $exception

Return Value

ExceptionContext|null