ErrorMessages: do not traverse down into remote exceptions
Otherwise we miss the actual error message. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
4905185e61
commit
453a1aaa65
@ -6,6 +6,8 @@
|
||||
package com.wireguard.android.util;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.wireguard.android.Application;
|
||||
@ -123,7 +125,10 @@ public final class ErrorMessages {
|
||||
while (cause.getCause() != null) {
|
||||
if (cause instanceof BadConfigException)
|
||||
break;
|
||||
cause = cause.getCause();
|
||||
final Throwable nextCause = cause.getCause();
|
||||
if (nextCause instanceof RemoteException)
|
||||
break;
|
||||
cause = nextCause;
|
||||
}
|
||||
return cause;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user