Package io.micronaut.nats.exception
Class NatsListenerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.messaging.exceptions.MessagingException
io.micronaut.messaging.exceptions.MessageListenerException
io.micronaut.nats.exception.NatsListenerException
- All Implemented Interfaces:
Serializable
public class NatsListenerException
extends io.micronaut.messaging.exceptions.MessageListenerException
Exception thrown when an error occurs processing a Nats message via a
NatsListener
.- Since:
- 1.0.0
- Author:
- jgrimm
- See Also:
-
Constructor Summary
ConstructorDescriptionNatsListenerException
(String message, Object listener, @Nullable io.nats.client.Message messageState) Creates a new exception.NatsListenerException
(String message, Throwable cause, Object listener, @Nullable io.nats.client.Message messageState) Creates a new exception. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NatsListenerException
public NatsListenerException(String message, Object listener, @Nullable @Nullable io.nats.client.Message messageState) Creates a new exception.- Parameters:
message
- The messagelistener
- The listenermessageState
- The message
-
NatsListenerException
public NatsListenerException(String message, Throwable cause, Object listener, @Nullable @Nullable io.nats.client.Message messageState) Creates a new exception.- Parameters:
message
- The messagecause
- The causelistener
- The listenermessageState
- The message
-
-
Method Details
-
getListener
- Returns:
- The bean that is the message listener
-
getMessageState
- Returns:
- The message that produced the error
-