mirror of
https://github.com/nix-community/nix-on-droid-app.git
synced 2025-12-03 15:41:07 +01:00
Handle all exceptions when loading termux.properties (#1590)
* Catch all exceptions which can occur. * Print short description in toast message about occurred exception.
This commit is contained in:
parent
b6d7831646
commit
f794bfcadc
1 changed files with 2 additions and 2 deletions
|
|
@ -162,8 +162,8 @@ final class TermuxPreferences {
|
||||||
props.load(new InputStreamReader(in, StandardCharsets.UTF_8));
|
props.load(new InputStreamReader(in, StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
Toast.makeText(context, "Could not open properties file termux.properties.", Toast.LENGTH_LONG).show();
|
Toast.makeText(context, "Could not open properties file termux.properties: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||||
Log.e("termux", "Error loading props", e);
|
Log.e("termux", "Error loading props", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue