Classes | |
class | ConfigError |
class | ModuleCloneError |
Functions | |
def | format_outerframe |
def | format_typename |
def ExceptionHandling::format_outerframe | ( | number | ) |
formats the outer frame 'number' to output like: In file foo.py, line 8: process.aPath = cms.Path(module1*module2) 'number' is the number of frames to go back relative to caller.
Definition at line 13 of file ExceptionHandling.py.
00013 : 00014 """formats the outer frame 'number' to output like: 00015 In file foo.py, line 8: 00016 process.aPath = cms.Path(module1*module2) 00017 00018 'number' is the number of frames to go back relative to caller. 00019 """ 00020 frame = inspect.stack()[number+1] #+1 because this routine adds another call 00021 return "In file %s, line %s:\n %s" %(frame[1], frame[2], frame[4][0]) 00022 00023 def format_typename(object):
def ExceptionHandling::format_typename | ( | object | ) |
format the typename and return only the last part
Definition at line 24 of file ExceptionHandling.py.
00024 : 00025 """format the typename and return only the last part""" 00026 return str(type(object)).split("'")[1].split(".")[-1] return str(type(object)).split("'")[1].split(".")[-1]