def report(     callingClass,<EOL>astr_key,<EOL>ab_exitToOs     = <NUM_LIT:1>,<EOL>astr_header     = "<STR_LIT>",<EOL>**kwargs<EOL>):
astr_header         = "<STR_LIT>"<EOL>ab_exitToOS         = False<EOL>ab_drawBox          = False<EOL>for k, v in kwargs.items():<EOL><INDENT>if k == '<STR_LIT>':   astr_header     = v<EOL>if k == '<STR_LIT>': ab_exitToOS     = v<EOL>if k == '<STR_LIT>':  ab_drawBox      = v<EOL><DEDENT>if ab_drawBox:<EOL><INDENT>log     = slog()<EOL><DEDENT>else:<EOL><INDENT>log     = Message()<EOL><DEDENT>b_syslog    = log.syslog()<EOL>log.syslog(False)<EOL>if ab_exitToOS: log( Colors.RED +    "<STR_LIT>" + Colors.NO_COLOUR )<EOL>else:           log( Colors.YELLOW + "<STR_LIT>" + Colors.NO_COLOUR )<EOL>if len(astr_header): log( Colors.BROWN + astr_header + Colors.NO_COLOUR )<EOL>log( "<STR_LIT:\n>" )<EOL>log( "<STR_LIT>" )<EOL>try:<EOL><INDENT>caller = inspect.stack()[<NUM_LIT:3>][<NUM_LIT:4>][<NUM_LIT:0>].strip()<EOL><DEDENT>except:<EOL><INDENT>caller = '<STR_LIT:__main__>'<EOL><DEDENT>log( Colors.LIGHT_GREEN + ("<STR_LIT:%s>" % callingClass.__class__.__name__) + Colors.NO_COLOUR + "<STR_LIT>")<EOL>log( Colors.LIGHT_CYAN + ("<STR_LIT:%s>" % caller) + Colors.NO_COLOUR)<EOL>log( "<STR_LIT>")<EOL>log( "<STR_LIT>" % callingClass._dictErr[astr_key]['<STR_LIT:action>'] )<EOL>log( "<STR_LIT>" % callingClass._dictErr[astr_key]['<STR_LIT:error>'] )<EOL>log( "<STR_LIT:\n>" )<EOL>log( "<STR_LIT>" % (<EOL>Colors.YELLOW,<EOL>callingClass._dictErr[astr_key]['<STR_LIT>'],<EOL>Colors.NO_COLOUR<EOL>)<EOL>)<EOL>if ab_drawBox:<EOL><INDENT>print(log.border_draw())<EOL><DEDENT>if ab_exitToOS:<EOL><INDENT>sys.exit( callingClass._dictErr[astr_key]['<STR_LIT>'] )<EOL><DEDENT>log.syslog(b_syslog)<EOL>return callingClass._dictErr[astr_key]['<STR_LIT>']<EOL>
Error handling.

Based on the <astr_key>, error information is extracted from
_dictErr and sent to log object.

If <ab_exitToOs> is False, error is considered non-fatal and
processing can continue, otherwise processing terminates.