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 IBaseExceptionHandler(ABC): (source)

Known subclasses: orionis.failure.base.BaseExceptionHandler

View In Hierarchy

Undocumented

Async Method handleCLI Render the exception message for CLI output.
Async Method handleHTTP Handle the exception for HTTP responses.
Method isExceptionIgnored Determine whether the given exception should be ignored.
Async Method report Report or log an exception.
Method toThrowable Convert an exception to a structured Throwable object.
async def handleCLI(self, exception: BaseException, console: IConsole): (source)

Render the exception message for CLI output.

Parameters
exception:BaseExceptionThe exception instance that was caught.
console:IConsoleThe console instance for output.
Returns
NoneThis method does not return a value.
async def handleHTTP(self, exception: BaseException, request: Request | TransportAdapter) -> Response | None: (source)

Handle the exception for HTTP responses.

Parameters
exception:BaseExceptionThe exception instance that was caught.
request:Request | TransportAdapterThe HTTP request instance or transport adapter that was being processed.
Returns
Response | NoneThe HTTP response if handled, otherwise None.
def isExceptionIgnored(self, exception: BaseException) -> bool: (source)

Determine whether the given exception should be ignored.

Parameters
exception:BaseExceptionThe exception instance to check.
Returns
boolTrue if the exception should be ignored, otherwise False.
async def report(self, exception: BaseException, log: ILogger) -> Throwable | None: (source)

Report or log an exception.

Parameters
exception:BaseExceptionThe exception instance that was caught.
log:ILoggerThe logger instance for error reporting.
Returns
Throwable or NoneThe structured Throwable object if reported, otherwise None.
def toThrowable(self, exception: BaseException) -> Throwable: (source)

Convert an exception to a structured Throwable object.

Parameters
exception:BaseExceptionException instance to be converted.
Returns
ThrowableStructured Throwable object containing class, message, arguments, and traceback.