CMS 3D CMS Logo

Classes | Functions
ExceptionHandling Namespace Reference

Classes

class  ConfigError
 
class  ModuleCloneError
 

Functions

def format_outerframe (number)
 
def format_typename (object)
 

Function Documentation

◆ format_outerframe()

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.

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

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

◆ format_typename()

def ExceptionHandling.format_typename (   object)
format the typename and return only the last part

Definition at line 24 of file ExceptionHandling.py.

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

References submitPVValidationJobs.split(), and str.

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

ExceptionHandling.format_outerframe
def format_outerframe(number)
Definition: ExceptionHandling.py:13
submitPVValidationJobs.split
def split(sequence, size)
Definition: submitPVValidationJobs.py:352
str
#define str(s)
Definition: TestProcessor.cc:53
ExceptionHandling.format_typename
def format_typename(object)
Definition: ExceptionHandling.py:24