def _msg_err(receiver, stringtuple):
 string = '{traceback}\n{errmsg}\n(Traceback was logged {timestamp}).'
 timestamp = logger.timeformat()
 tracestring = format_exc()
 logger.log_trace()
 if _IN_GAME_ERRORS:
  receiver.msg(string.format(traceback=tracestring, errmsg=stringtuple[0].strip(), timestamp=timestamp).strip())
 else:
  receiver.msg(string.format(traceback=tracestring.splitlines()[(-1)], errmsg=stringtuple[1].strip(), timestamp=timestamp).strip())

def _msg_err ( receiver , stringtuple ) : string = '{traceback}\n{errmsg}\n(Traceback was logged {timestamp}).' timestamp = logger . timeformat ( ) tracestring = format_exc ( ) logger . log_trace ( ) if _IN_GAME_ERRORS : receiver . msg ( string . format ( traceback = tracestring , errmsg = stringtuple [ 0 ] . strip ( ) , timestamp = timestamp ) . strip ( ) ) else : receiver . msg ( string . format ( traceback = tracestring . splitlines ( ) [ ( - 1 ) ] , errmsg = stringtuple [ 1 ] . strip ( ) , timestamp = timestamp ) . strip ( ) )
helper function for returning an error to the caller .