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.

def report(     callingClass,
                astr_key,
                ab_exitToOs     = 1,
                astr_header     = "",
                **kwargs
                ):
    '''
    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.

    '''

    astr_header         = ""
    ab_exitToOS         = False
    ab_drawBox          = False
    for k, v in kwargs.items():
        if k == 'header':   astr_header     = v
        if k == 'exitToOS': ab_exitToOS     = v
        if k == 'drawBox':  ab_drawBox      = v

    if ab_drawBox:
        log     = slog()
    else:
        log     = Message()

    b_syslog    = log.syslog()
    log.syslog(False)
    if ab_exitToOS: log( Colors.RED +    ":: FATAL ERROR :: " + Colors.NO_COLOUR )
    else:           log( Colors.YELLOW + "::   WARNING   :: " + Colors.NO_COLOUR )
    if len(astr_header): log( Colors.BROWN + astr_header + Colors.NO_COLOUR )
    log( "\n" )
    log( "\tSorry, some error seems to have occurred in:\n\n\t\t<" )
    try:
        caller = inspect.stack()[3][4][0].strip()
    except:
        caller = '__main__'
    log( Colors.LIGHT_GREEN + ("%s" % callingClass.__class__.__name__) + Colors.NO_COLOUR + "::")
    log( Colors.LIGHT_CYAN + ("%s" % caller) + Colors.NO_COLOUR)
    log( ">\n\n")

    log( "\tWhile %s\n" % callingClass._dictErr[astr_key]['action'] )
    log( "\t%s\n" % callingClass._dictErr[astr_key]['error'] )
    log( "\n" )
    log( "Returning with error code %s%d%s" % (
                    Colors.YELLOW,
                    callingClass._dictErr[astr_key]['exitCode'],
                    Colors.NO_COLOUR
                    )
    )

    if ab_drawBox:
        print(log.border_draw())
    if ab_exitToOS:
        sys.exit( callingClass._dictErr[astr_key]['exitCode'] )
    log.syslog(b_syslog)
    return callingClass._dictErr[astr_key]['exitCode']