ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

class ICatch(ABC): (source)

Known subclasses: orionis.failure.Catch

View In Hierarchy

Define the contract for catch implementations.

Async Method capture Observe an exception through the active failure runtime.
Async Method exception Handle an exception in the current kernel context.
async def capture(self, exception: BaseException, *, context: FailureContext) -> FailureReceipt | None: (source)
overridden in orionis.failure.Catch

Observe an exception through the active failure runtime.

Preserve compatibility by delegating to the active runtime without requiring a dependency-injection scope.

Parameters
exception:BaseExceptionOriginal exception instance to observe.
context:orionis.failure.entities.context.FailureContextImmutable execution metadata for the failure.
Returns
orionis.failure.entities.context.FailureReceipt or NoneDelivery status, or None if no runtime is active or the exception represents cancellation or process control.
@abstractmethod
async def exception(self, exception: BaseException, request: Request | TransportAdapter | None = None) -> Response | None: (source)
overridden in orionis.failure.Catch

Handle an exception in the current kernel context.

Parameters
exception:BaseExceptionOriginal exception instance to handle.
request:Request or TransportAdapter or None, optionalHTTP request or transport adapter used for presentation, when available.
Returns
orionis.http.responses.Response or NoneResponse produced by presentation, or None when no response is available.
Raises
RuntimeErrorIf no application scope or kernel context is active.
BaseExceptionThe primary failure if presentation fails or times out. Genuine caller cancellation and process-control signals remain unchanged.