summaryrefslogtreecommitdiffstats
path: root/v3po/translate-api
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-06-27 10:16:31 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-06-27 10:16:36 +0200
commit6e3de9c3e99fdf284e63f303d3a32bd4dfbd124e (patch)
tree09dd72073767af3b26b6a8cdb4c20e5e6f8dc9ad /v3po/translate-api
parentc05597d26843210570d49f9675c57a13b668ad32 (diff)
HONEYCOMB-100: introduce default 5s timeout
in TranslateUtils.getReplyFor* calls Change-Id: Iac2bb428ea6adcc8d3da2238db1dec708df550f0 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/translate-api')
-rw-r--r--v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java16
1 files changed, 14 insertions, 2 deletions
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,
@@ -56,6 +56,18 @@ public class WriteFailedException extends TranslationException {
}
/**
+ * 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.
*
* @return data object instance identifier