ConcurrentException (Apache Commons Lang 3.20.0 API)
Description: declaration: package: org.apache.commons.lang3.concurrent, class: ConcurrentException

# Class ConcurrentException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.commons.lang3.concurrent.ConcurrentException

All Implemented Interfaces:
  `Serializable`

public class ConcurrentException extends Exception
An exception class used for reporting error conditions related to accessing data of background tasks.

The purpose of this exception class is analogous to the default JDK exception class `ExecutionException`, i.e. it wraps an exception that occurred during the execution of a task. However, in contrast to `ExecutionException`, it wraps only checked exceptions. Runtime exceptions are thrown directly.

Since:
  3.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ConcurrentException()`
  Creates a new, uninitialized instance of `ConcurrentException`.
  ``
  `ConcurrentException(String message)`
  Constructs a new exception with the specified detail message.
  ``
  `ConcurrentException(String msg, Throwable cause)`
  Creates a new instance of `ConcurrentException` and initializes it with the given message and cause.
  ``
  `ConcurrentException(Throwable cause)`
  Creates a new instance of `ConcurrentException` and initializes it with the given cause.

- ## Method Summary

  ### Methods inherited from class Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ConcurrentException

    protected ConcurrentException()
    Creates a new, uninitialized instance of `ConcurrentException`.

  - ### ConcurrentException

    public ConcurrentException(String message)
    Constructs a new exception with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call to `Throwable.initCause(Throwable)`.
    Parameters:
      `message` - the detail message. The detail message is saved for later retrieval by the `Throwable.getMessage()` method.
    Since:
      3.19.0

  - ### ConcurrentException

    public ConcurrentException(String msg, Throwable cause)
    Creates a new instance of `ConcurrentException` and initializes it with the given message and cause.
    Parameters:
      `msg` - the error message
      `cause` - the cause of this exception
    Throws:
      `IllegalArgumentException` - if the cause is not a checked exception

  - ### ConcurrentException

    public ConcurrentException(Throwable cause)
    Creates a new instance of `ConcurrentException` and initializes it with the given cause.
    Parameters:
      `cause` - the cause of this exception
    Throws:
      `IllegalArgumentException` - if the cause is not a checked exception