Source code for cloudmesh_client.common.Error

import sys
import traceback


[docs]class Error(object):
[docs] @classmethod def msg(cls, error=None, debug=True, trace=True): if debug and error is not None: print(error) if trace: print(traceback.format_exc())
[docs] @classmethod def traceback(cls, error=None, debug=True, trace=True): Error.msg(error=error, debug=debug, trace=trace)
[docs] @classmethod def info(cls, msg): # TODO: if info: print(msg)
[docs] @classmethod def warning(cls, msg): # TODO: if warning: print(msg)
[docs] @classmethod def debug(cls, msg): # TODO: if debug: print(msg)
[docs] @classmethod def exit(cls, msg): # TODO: if debug: print(msg) sys.exit()