CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Functions
ExceptionHandling Namespace Reference

Classes

class  ConfigError
 
class  ModuleCloneError
 

Functions

def format_outerframe
 
def format_typename
 

Function Documentation

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.

Referenced by SequenceTypes._checkIfBooleanLogicSequenceable(), SequenceTypes._checkIfSequenceable(), Config.Process._placeEndPath(), Config.Process._placeFinalPath(), and Config.Process._placePath().

13 
14 def format_outerframe(number):
15  """formats the outer frame 'number' to output like:
16  In file foo.py, line 8:
17  process.aPath = cms.Path(module1*module2)
18 
19  'number' is the number of frames to go back relative to caller.
20  """
21  frame = inspect.stack()[number+1] #+1 because this routine adds another call
22  return "In file %s, line %s:\n %s" %(frame[1], frame[2], frame[4][0])
23 
def ExceptionHandling.format_typename (   object)
format the typename and return only the last part

Definition at line 24 of file ExceptionHandling.py.

References submitPVValidationJobs.split(), and str.

Referenced by SequenceTypes._checkIfBooleanLogicSequenceable(), and SequenceTypes._checkIfSequenceable().

24 
25 def format_typename(object):
26  """format the typename and return only the last part"""
27  return str(type(object)).split("'")[1].split(".")[-1]
#define str(s)