Skip to content

msaUtils Module

.errorhandling


Classes

MSABaseExceptionHandler

Attributes

stack_trace instance-attribute
stack_trace = list()

Functions

__init__
__init__() -> None
handle
handle(ex: Exception, *args)

handle Exception

Get the current system exception, extract unformatter stack traces as tuples.

flowchart LR
     system_exception -. n:m .-> Exceptions
     Exceptions -. m:m .-> Extract
     Extract -. m:m .-> Formatted

Formats stacktrace to: File : %s , Line : %d, Func.Name : %s, Message : %s

Logs the information with logger.error() str, args, type, value, stack_trace

RAISES DESCRIPTION
TypeError

Exception: ... Arguments: ... Message: ... Stack trace: ...

Functions

getMSABaseExceptionHandler cached

getMSABaseExceptionHandler() -> MSABaseExceptionHandler

This function returns a cached instance of the MSABaseExceptionHandler object.

Note

Caching is used to prevent re-reading the environment every time the MSABaseExceptionHandler is used.


Last update: September 24, 2022
Created: September 24, 2022