com.atlassian.plugin.event
Class NotificationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.atlassian.plugin.PluginException
com.atlassian.plugin.event.NotificationException
- All Implemented Interfaces:
- java.io.Serializable
public class NotificationException
- extends PluginException
This is used to wrap one or more exceptions thrown by Plugin Event Listeners on receiving an event.
getAllCauses() will return a list with all the exceptions that were thrown by the listeners.
Throwable.getCause() will return just the first Exception in the list.
- Since:
- 2.3.0
- See Also:
- Serialized Form
|
Constructor Summary |
NotificationException(java.util.List<java.lang.Throwable> causes)
Constructs a NotificationException with a List of the Exceptions that were thrown by the Listeners. |
NotificationException(java.lang.Throwable cause)
Constructs a NotificationException with a single caused by Exception thrown by a Listener. |
|
Method Summary |
java.util.List<java.lang.Throwable> |
getAllCauses()
|
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NotificationException
public NotificationException(java.lang.Throwable cause)
- Constructs a NotificationException with a single caused by Exception thrown by a Listener.
- Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method).
(A null value should never be passed because this exception is only used to wrap other exceptions.)
- Throws:
java.lang.NullPointerException - If a null List is passed.
java.lang.IndexOutOfBoundsException - If an empty List is passed.
NotificationException
public NotificationException(java.util.List<java.lang.Throwable> causes)
- Constructs a NotificationException with a List of the Exceptions that were thrown by the Listeners.
- Parameters:
causes - all Exceptions that were thrown by the Listeners.
(the full list will be available by the getAllCauses() method;
the Throwable.getCause() method will just return the first cause in the list.
- Throws:
java.lang.NullPointerException - If a null List is passed.
java.lang.IndexOutOfBoundsException - If an empty List is passed.
getAllCauses
public java.util.List<java.lang.Throwable> getAllCauses()
Copyright © 2013 Atlassian. All Rights Reserved.