Class 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 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 graph
        cause - 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 occurred
        cause - 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 a java.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, use getCausesMap().
        Returns:
        Map of all exceptions causing this composite exception
      • getCausesMap

        public Map<String,​List<Throwable>> getCausesMap()
        Get a java.util.Map of cause exceptions, keyed by name.
        Returns:
        Map of all exceptions causing this composite exception
      • getPathList

        public List<String> getPathList()
        Get a java.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 class Throwable
      • printStackTrace

        public void printStackTrace​(PrintStream printStream)
        Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the specified PrintStream.
        Overrides:
        printStackTrace in class Throwable
      • printStackTrace

        public void printStackTrace​(PrintWriter printWriter)
        Prints this exception's stack trace, and the stack trace of all the causing exceptions, to the specified PrintWriter.
        Overrides:
        printStackTrace in class Throwable
      • toString

        public String toString()
        Prints this exception's stack trace and cause map.
        Overrides:
        toString in class Throwable