Interface GateleenExceptionFactory
-
public interface GateleenExceptionFactoryApplies dependency inversion for exception instantiation. This class did arise because we had different use cases in different applications. One of them has the need to perform fine-grained error reporting. Whereas in the other application this led to performance issues. So now through this abstraction, both applications can choose the behavior they need. There are two default options an app can use (if it does not want to provide a custom impl). One isGateleenThriftyExceptionFactory. It trades maintainability for speed. For example prefers lightweight exceptions without stacktrace recording. Plus it may apply other tricks to reduce resource costs. The other one isGateleenWastefulExceptionFactory. It trades speed for maintainability. So it tries to track as much error details as possible. For example recording stack traces, keeping 'cause' and 'suppressed' exceptions, plus maybe more. If none of those defaults matches, an app can provide its custom implementation via dependency injection.
-
-
Method Summary
-
-
-
Method Detail
-
newException
default Exception newException(String msg)
Convenience overload fornewException(String, Throwable).
-
newException
default Exception newException(Throwable cause)
Convenience overload fornewException(String, Throwable).
-
newIllegalStateException
default IllegalStateException newIllegalStateException(String msg)
Convenience overload fornewIllegalStateException(String, Throwable).
-
newIllegalStateException
default IllegalStateException newIllegalStateException(Throwable cause)
Convenience overload fornewIllegalStateException(String, Throwable).
-
newIllegalStateException
IllegalStateException newIllegalStateException(String msg, Throwable cause)
-
newReplyException
io.vertx.core.eventbus.ReplyException newReplyException(io.vertx.core.eventbus.ReplyFailure failureType, int failureCode, String message)
-
newGateleenThriftyExceptionFactory
static GateleenExceptionFactory newGateleenThriftyExceptionFactory()
SeeGateleenThriftyExceptionFactory.
-
newGateleenWastefulExceptionFactory
static GateleenExceptionFactory newGateleenWastefulExceptionFactory()
SeeGateleenWastefulExceptionFactory.
-
-