diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-06-27 10:16:31 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-06-27 10:16:36 +0200 |
commit | fcb9480a3b06b4dd6d56456edf4b89c7a9194630 (patch) | |
tree | 9e235a915500e13197a89afe4d91d358ae8323ff /v3po/translate-api/src/main/java/io/fd | |
parent | b7e529c73d3480bfe1d528215e2654c0d8532554 (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/src/main/java/io/fd')
-rw-r--r-- | v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java | 16 |
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 |