changeset 519:609c9990c9fb

add more debug code
author Carl Byington <carl@five-ten-sg.com>
date Fri, 31 May 2024 14:35:00 -0600
parents 9acc51a5a98f
children e6fa2c27140f
files app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Fri May 31 13:35:44 2024 -0600
+++ b/app/src/main/java/com/five_ten_sg/connectbot/HostListActivity.java	Fri May 31 14:35:00 2024 -0600
@@ -473,11 +473,19 @@
             String fn;
             try {
                 fn = external_dir + accuspeech + con;
+                Log.d(TAG, "trying to read " + fn);
                 reader = new BufferedReader(new FileReader(fn));
             }
             catch (Exception e) {
-                fn = download_dir + con;
-                reader = new BufferedReader(new FileReader(fn));
+                try {
+                    fn = download_dir + con;
+                    Log.d(TAG, "trying to read " + fn);
+                    reader = new BufferedReader(new FileReader(fn));
+                }
+                catch (Exception e) {
+                    Log.d(TAG, "cannot read either file");
+                    return;
+                }
             }
             String line = null;
 
@@ -612,7 +620,7 @@
             hostdb.setDefaultColorsForScheme(hostdb.DEFAULT_COLOR_SCHEME, fg, bg);
         }
         catch (Exception e) {
-            Log.d(TAG, "Deployment scan failed.");
+            Log.d(TAG, e.getMessage() + " Deployment scan failed.");
         }
         return launch;
     }