summaryrefslogtreecommitdiffhomepage
path: root/tunnel/src/main/java/com/wireguard/android/backend/BackendException.java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-09 12:36:47 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-09 12:36:47 -0600
commit2e55e5fd051278a949d698f84580bef12c9324d8 (patch)
treef3a2f33b3af02d8f72dc03034841835a60d01266 /tunnel/src/main/java/com/wireguard/android/backend/BackendException.java
parent40ebf8006e46f8857340648d7cea234ed699aed7 (diff)
global: format code
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/src/main/java/com/wireguard/android/backend/BackendException.java')
-rw-r--r--tunnel/src/main/java/com/wireguard/android/backend/BackendException.java27
1 files changed, 15 insertions, 12 deletions
diff --git a/tunnel/src/main/java/com/wireguard/android/backend/BackendException.java b/tunnel/src/main/java/com/wireguard/android/backend/BackendException.java
index 0f60701b..55fdb602 100644
--- a/tunnel/src/main/java/com/wireguard/android/backend/BackendException.java
+++ b/tunnel/src/main/java/com/wireguard/android/backend/BackendException.java
@@ -9,6 +9,21 @@ import com.wireguard.util.NonNullForAll;
@NonNullForAll
public final class BackendException extends Exception {
+ private final Object[] format;
+ private final Reason reason;
+ public BackendException(final Reason reason, final Object... format) {
+ this.reason = reason;
+ this.format = format;
+ }
+
+ public Object[] getFormat() {
+ return format;
+ }
+
+ public Reason getReason() {
+ return reason;
+ }
+
public enum Reason {
UNKNOWN_KERNEL_MODULE_NAME,
WG_QUICK_CONFIG_ERROR_CODE,
@@ -18,16 +33,4 @@ public final class BackendException extends Exception {
TUN_CREATION_ERROR,
GO_ACTIVATION_ERROR_CODE
}
- private final Reason reason;
- private final Object[] format;
- public BackendException(final Reason reason, final Object ...format) {
- this.reason = reason;
- this.format = format;
- }
- public Reason getReason() {
- return reason;
- }
- public Object[] getFormat() {
- return format;
- }
}