From 6e3de9c3e99fdf284e63f303d3a32bd4dfbd124e Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 27 Jun 2016 10:16:31 +0200 Subject: HONEYCOMB-100: introduce default 5s timeout in TranslateUtils.getReplyFor* calls Change-Id: Iac2bb428ea6adcc8d3da2238db1dec708df550f0 Signed-off-by: Marek Gradzki --- .../v3po/translate/write/WriteFailedException.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'v3po/translate-api/src/main') diff --git a/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java b/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java index a924c7646..10a664fcf 100644 --- a/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java +++ b/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java @@ -31,11 +31,11 @@ public class WriteFailedException extends TranslationException { private final InstanceIdentifier failedId; /** - * Constructs an WriteFailedException given data id and exception cause. + * Constructs an WriteFailedException given data id, exception detail message and exception cause. * * @param failedId instance identifier of the data object that could not be read * @param cause the cause of read failure - * @param message + * @param message the exception detail message */ public WriteFailedException(@Nonnull final InstanceIdentifier failedId, @Nonnull final String message, @@ -55,6 +55,18 @@ public class WriteFailedException extends TranslationException { this.failedId = checkNotNull(failedId, "failedId should not be null"); } + /** + * Constructs an WriteFailedException given data id and exception cause. + * + * @param failedId instance identifier of the data object that could not be read + * @param cause the cause of read failure + */ + public WriteFailedException(@Nonnull final InstanceIdentifier failedId, + @Nonnull final Throwable cause) { + super(cause); + this.failedId = checkNotNull(failedId, "failedId should not be null"); + } + /** * Returns id of the data object that could not be written. * -- cgit 1.2.3-korg