|
Methods defined here:
- __init__(self, error_type, error_code, exception=None, description='None', nvSeq=None, create=1, severity=None)
- The constructor basically allows the developer to specify any number of
parameters for an error trace, but requires none. Python is flexible enough
to let us do this.
Parameters:
- error_type is the error type (a long)
- error_code is the error code (a long)
- exception is a previous exception from the ACS Error System, or a Python
native exception, in which case, an ErrorTrace will be constructed. The traceback
should be ok in most cases, but if you find that it isn't, a possible workaround is
converting the python exception to an ACS exception using pyExceptionToCORBA()
before passing it to an ACSError constructor. Remember, that if you don't use
pyExceptionToCORBA(), if
you are dealing with a native exception, you must pass create=1 to the ACSError
constructor.
- description is a stringified description of the errror
- nvSeq is a name-value sequence describing the error condition. Each value
should be of the type ACSErr.NameValue
- create with a value of 1 implies error information will be added to the stack
- severity is the ACSErr severity of the error
Returns: Nothing
Raises: Nothing
- getErrorTrace(self)
- Overridden
- setErrorTrace(self, et_obj)
- Sets the member error trace
Parameters: et_obj is an ACSErr.ErrorTrace instances
Returns: Nothing
Raises: Nothing
Methods inherited from Acspy.Common.ErrorTrace.ErrorTraceHelper:
- Print(self)
- Prints errortrace information to standard out.
Parameters: None
Returns: Nothing
Raises: Nothing
- addData(self, name, value)
- Adds data to the current error
Parameters: name and value will both be converted to strings.
Returns: Nothing
Raises: Nothing
- errorTraceToString(self, error_trace, ws)
- Converts an error trace to a human-readable string.
Parameters: error_trace is an errortrace
ws is whitespace
Returns: Nothing
Raises: Nothing
- getData(self, name)
- Gets previously set data from the ErrorTrace.
Parameters: name of the data as defined by the addData method
Returns: a list of previously set data (stringified) with the matching
name. This list can be empty if there are no matches
Raises: Nothing
- getDescription(self)
- Returns copy of description of current error.
Parameters: None
Returns: Nothing
Raises: Nothing
- getErrorCode(self)
- Returns error code
Parameters: None
Returns: error code
Raises: Nothing
- getErrorType(self)
- Returns error type
Parameters: None
Returns: error type
Raises: Nothing
- getFileName(self)
- Returns file name information of the error
Parameters: None
Returns: filename
Raises: Nothing
- getHostName(self)
- Returns host name information of the error
Parameters: None
Returns: hostname
Raises: Nothing
- getLineNumber(self)
- Returns line number information of the error
Parameters: None
Returns: line number
Raises: Nothing
- getNext(self)
- Moves to the next errortrace element and returns a reference to it.
Parameters: None
Returns: the next errortrace element or None if it does not exist
Raises: Nothing
- getProcess(self)
- Returns process information of the error. Its name or process ID.
Parameters: None
Returns: Process ID
Raises: Nothing
- getRoutine(self)
- Returns routine information of the error
Parameters: None
Returns: routine name
Raises: Nothing
- getSeverity(self)
- Returns error severity
Parameters: None
Returns: Severity
Raises: Nothing
- getThread(self)
- Returns thread information of the error. The name of thread or its ID.
Parameters: None
Returns: Thread ID
Raises: Nothing
- getTimeStamp(self)
- Returns time stamp of the error in 100th of nanoseconds.
Parameters: None
Returns: time stamp
Raises: Nothing
- isOK(self)
- Returns 1 if errortrace does not represent error otherwise 0.
Parameters: None
Returns: 0 or 1
Raises: Nothing
- log(self, logger, priority=ACS_LOG_ERROR)
- Logs errortrace information into the ACS logging system.
Parameters:
- priorty which will be used for logging the error
Returns: Nothing
Raises: Nothing
- printET(self, error_trace, ws)
- Prints one error trace to standard out.
Parameters: et is an errortrace
ws is whitespace
Returns: Nothing
Raises: Nothing
- setData(self, name, value)
- Sets data within the ErrorTrace, adding it if it has not been
previously set.
Parameters: name and value will both be converted to strings.
Returns: Nothing
Raises: Nothing
- setError(self, error_code=None, error_type=None)
- Sets the error type/code
Parameters: self-explanatory
Returns: Nothing
Raises: ValueError if invalid parameters are given
- setFileName(self, file_name)
- Sets file name
Parameters: name of the file
Returns: Nothing
Raises: Nothing
- setLineNumber(self, line_number)
- Sets line number
Parameters: the line number
Returns: Nothing
Raises: Nothing
- setSeverity(self, severity)
- Sets error severity
Parameters: severity of the error
Returns: Nothing
Raises: Nothing
- setTimeStamp(self, time)
- Sets time stamp of the error in 100th of nanoseconds.
Parameters: the time stamp of the error
Returns: Nothing
Raises: Nothing
|