Package net.dv8tion.jda.api.exceptions
Class ContextException
java.lang.Object
java.lang.Throwable
java.lang.Exception
net.dv8tion.jda.api.exceptions.ContextException
- All Implemented Interfaces:
Serializable
Used to pass a context to async exception handling for debugging purposes.
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a wrappingConsumer
for the provided target.Creates a failure consumer that appends a context cause before printing the stack trace usingThrowable.printStackTrace()
.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ContextException
public ContextException()
-
-
Method Details
-
herePrintingTrace
Creates a failure consumer that appends a context cause before printing the stack trace usingThrowable.printStackTrace()
.
Equivalent tohere(Throwable::printStackTrace)
- Returns:
- Wrapping failure consumer around
Throwable::printStackTrace
-
here
Creates a wrappingConsumer
for the provided target.- Parameters:
acceptor
- The end-target for the throwable- Returns:
- Wrapper of the provided consumer that will append a context with the current stack-trace
-