summaryrefslogtreecommitdiffstats
path: root/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriteFailedException.java')
-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