- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.pervasive.datarush.exceptions.DRException
-
- com.pervasive.datarush.graphs.DROperatorException
-
- All Implemented Interfaces:
Serializable
public class DROperatorException extends DRException
Wrapper for errors occurring during the execution of a dataflow graph. Each error is recorded along with the path to the dataflow process which threw it.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DROperatorException(GraphPath path, Throwable cause)
Creates a wrapper for the specified error associated with the given node.DROperatorException(String name)
Constructs an execution exception for a dataflow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(String instanceName, Throwable cause)
Add a cause exception from the specified instance.Map<String,Throwable>
getCauseMap()
Get ajava.util.Map
of cause exceptions, keyed by name.Map<String,List<Throwable>>
getCausesMap()
Get ajava.util.Map
of cause exceptions, keyed by name.List<String>
getPathList()
Get ajava.util.List
of the names where an exception occurred, in the order in which the exceptions were added to this composite exception.void
merge(DROperatorException ex)
Combine another composite exception with this one.void
printStackTrace()
Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the standard error stream.void
printStackTrace(PrintStream printStream)
Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the specifiedPrintStream
.void
printStackTrace(PrintWriter printWriter)
Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the specifiedPrintWriter
.String
toString()
Prints this exception's stack trace and cause map.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace
-
-
-
-
Constructor Detail
-
DROperatorException
public DROperatorException(GraphPath path, Throwable cause)
Creates a wrapper for the specified error associated with the given node.- Parameters:
path
- the unique path identifying the node in the composed graphcause
- the error which occurred
-
DROperatorException
public DROperatorException(String name)
Constructs an execution exception for a dataflow.- Parameters:
name
- Name of the source of the exception
-
-
Method Detail
-
add
public void add(String instanceName, Throwable cause)
Add a cause exception from the specified instance.- Parameters:
instanceName
- Name of the instances where the exception occurredcause
- Exception causing this composite exception
-
merge
public void merge(DROperatorException ex)
Combine another composite exception with this one. All exceptions in the source exception will be added to this one.- Parameters:
ex
- Composite exception to merge
-
getCauseMap
public Map<String,Throwable> getCauseMap()
Get ajava.util.Map
of cause exceptions, keyed by name. Note that this map contains the first exception for each path. If the full list of exceptions is desired, usegetCausesMap()
.- Returns:
- Map of all exceptions causing this composite exception
-
getCausesMap
public Map<String,List<Throwable>> getCausesMap()
Get ajava.util.Map
of cause exceptions, keyed by name.- Returns:
- Map of all exceptions causing this composite exception
-
getPathList
public List<String> getPathList()
Get ajava.util.List
of the names where an exception occurred, in the order in which the exceptions were added to this composite exception.- Returns:
List
of the names where an exception occurred- See Also:
add(String, Throwable)
-
printStackTrace
public void printStackTrace()
Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the standard error stream.- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
public void printStackTrace(PrintStream printStream)
Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the specifiedPrintStream
.- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
public void printStackTrace(PrintWriter printWriter)
Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the specifiedPrintWriter
.- Overrides:
printStackTrace
in classThrowable
-
-