From be562fe3c5c6f47d78724de8221974acec389a4f Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sat, 4 Apr 2015 23:09:54 -0700 Subject: Provide more context for SSH connection failures Since the Trilead SSH stack throws IOException on failures and then higher levels of the stack catch those, we need to descend into the causes of each Exception to give the user more context. Unfortunately this information is not localized. Change-Id: I8b1fdf9eab65e5d2f6f1956562cbf9f56a2adb9d --- src/org/connectbot/transport/SSH.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/connectbot/transport/SSH.java b/src/org/connectbot/transport/SSH.java index c5103f5..ab1ca4c 100644 --- a/src/org/connectbot/transport/SSH.java +++ b/src/org/connectbot/transport/SSH.java @@ -454,7 +454,11 @@ public class SSH extends AbsTransport implements ConnectionMonitor, InteractiveC Log.e(TAG, "Problem in SSH connection thread during authentication", e); // Display the reason in the text. - bridge.outputLine(e.getCause().getMessage()); + Throwable t = e.getCause(); + do { + bridge.outputLine(t.getMessage()); + t = t.getCause(); + } while (t != null); close(); onDisconnect(); -- cgit v1.2.3