diff --git a/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenExceptionFactory.java b/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenExceptionFactory.java index 20094131..9154af41 100644 --- a/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenExceptionFactory.java +++ b/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenExceptionFactory.java @@ -13,8 +13,18 @@ * So now through this abstraction, both applications can choose the behavior * they need. * - * If dependency-injection gets applied properly, an app can even provide its - * custom implementation to fine-tune the exact behavior even further. + * There are two default options an app can use (if it does not want to provide + * a custom impl). + * One is {@link GateleenThriftyExceptionFactory}. 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 is {@link GateleenWastefulExceptionFactory}. 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. */ public interface GateleenExceptionFactory { diff --git a/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenThriftyExceptionFactory.java b/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenThriftyExceptionFactory.java index c6607ca9..1a26ae48 100644 --- a/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenThriftyExceptionFactory.java +++ b/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenThriftyExceptionFactory.java @@ -4,11 +4,7 @@ import io.vertx.core.eventbus.ReplyFailure; /** - * Trades maintainability for speed. For example prefers lightweight - * exceptions without stacktrace recording. It may even decide to drop 'cause' - * or other details. If an app needs more error details it should use - * {@link GateleenWastefulExceptionFactory}. If none of those fits the apps needs, it - * can provide its own implementation. + * See {@link GateleenExceptionFactory} for details. */ class GateleenThriftyExceptionFactory implements GateleenExceptionFactory { diff --git a/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenWastefulExceptionFactory.java b/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenWastefulExceptionFactory.java index aa89d844..1fc0889c 100644 --- a/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenWastefulExceptionFactory.java +++ b/gateleen-core/src/main/java/org/swisspush/gateleen/core/exception/GateleenWastefulExceptionFactory.java @@ -4,12 +4,7 @@ import io.vertx.core.eventbus.ReplyFailure; /** - * Trades speed for maintainability. For example invests more resources like - * recording stack traces (which likely provocates more logs) to get easier - * to debug error messages and better hints of what is happening. It also - * keeps details like 'causes' and 'suppressed' exceptions. If an app needs - * more error details it should use {@link GateleenWastefulExceptionFactory}. If none - * of those fits the apps needs, it can provide its own implementation. + * See {@link GateleenExceptionFactory} for details. */ class GateleenWastefulExceptionFactory implements GateleenExceptionFactory {