def err(_stuff=None, _why=None, **kw):
 if (_stuff is None):
  _stuff = failure.Failure()
 if isinstance(_stuff, failure.Failure):
  msg(failure=_stuff, why=_why, isError=1, **kw)
 elif isinstance(_stuff, Exception):
  msg(failure=failure.Failure(_stuff), why=_why, isError=1, **kw)
 else:
  msg(repr(_stuff), why=_why, isError=1, **kw)

def err ( _stuff = None , _why = None , ** kw ) : if ( _stuff is None ) : _stuff = failure . Failure ( ) if isinstance ( _stuff , failure . Failure ) : msg ( failure = _stuff , why = _why , isError = 1 , ** kw ) elif isinstance ( _stuff , Exception ) : msg ( failure = failure . Failure ( _stuff ) , why = _why , isError = 1 , ** kw ) else : msg ( repr ( _stuff ) , why = _why , isError = 1 , ** kw )
handle unexpected errors .