Package edu.rit.pj

Class MultipleParallelException

java.lang.Object
java.lang.Throwable
java.lang.Exception
edu.rit.pj.MultipleParallelException
All Implemented Interfaces:
Serializable

public class MultipleParallelException extends Exception
Class MultipleParallelException is thrown to indicate that multiple threads in a parallel team threw exceptions while executing a parallel construct. The individual exceptions thrown by the threads are contained in a Map mapping the thread index (type Integer) to the exception thrown by that thread (type Throwable).
Version:
16-May-2007
Author:
Alan Kaminsky
See Also:
  • Constructor Details

    • MultipleParallelException

      public MultipleParallelException()
      Create a new multiple parallel exception with no detail message and no exception map.
    • MultipleParallelException

      public MultipleParallelException(String theMessage)
      Create a new multiple parallel exception with the given detail message and no exception map.
      Parameters:
      theMessage - Detail message.
    • MultipleParallelException

      public MultipleParallelException(ConcurrentHashMap<Integer,Throwable> theMap)
      Create a new multiple parallel exception with no detail message and the given exception map.
      Parameters:
      theMap - Exception map.
    • MultipleParallelException

      public MultipleParallelException(String theMessage, ConcurrentHashMap<Integer,Throwable> theMap)
      Create a new multiple parallel exception with the given detail message and the given exception map.
      Parameters:
      theMessage - Detail message.
      theMap - Exception map.
  • Method Details

    • getExceptionMap

      public Map<Integer,Throwable> getExceptionMap()
      Obtain this multiple parallel exception's exception map.
      Returns:
      Exception map, or null if none.
    • printStackTrace

      public void printStackTrace(PrintStream s)
      Print this throwable and its backtrace to the specified print stream. The stack traces of this multiple parallel exception itself and of all the wrapped exceptions in the exception map are printed.
      Overrides:
      printStackTrace in class Throwable
    • printStackTrace

      public void printStackTrace(PrintWriter s)
      Print this throwable and its backtrace to the specified print writer. The stack traces of this multiple parallel exception itself and of all the wrapped exceptions in the exception map are printed.
      Overrides:
      printStackTrace in class Throwable
      Parameters:
      s - Print writer to use for output.