Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit 7ac5514

Browse files
hamptoscgdecker
authored andcommitted
Add a constructor to VerifyException to permit a cause to provided alongside a message.
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=80128106
1 parent c633d07 commit 7ac5514

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

guava/src/com/google/common/base/VerifyException.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,24 @@ public VerifyException() {}
3636
public VerifyException(@Nullable String message) {
3737
super(message);
3838
}
39+
40+
/**
41+
* Constructs a {@code VerifyException} with the cause {@code cause} and a message that is
42+
* {@code null} if {@code cause} is null, and {@code cause.toString()} otherwise.
43+
*
44+
* @since 19.0
45+
*/
46+
public VerifyException(@Nullable Throwable cause) {
47+
super(cause);
48+
}
49+
50+
/**
51+
* Constructs a {@code VerifyException} with the message {@code message} and the cause
52+
* {@code cause}.
53+
*
54+
* @since 19.0
55+
*/
56+
public VerifyException(@Nullable String message, @Nullable Throwable cause) {
57+
super(message, cause);
58+
}
3959
}

0 commit comments

Comments
 (0)