mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-05 18:25:31 +08: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:
@@ -162,8 +162,8 @@ final class TermuxPreferences {
|
||||
props.load(new InputStreamReader(in, StandardCharsets.UTF_8));
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Toast.makeText(context, "Could not open properties file termux.properties.", Toast.LENGTH_LONG).show();
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(context, "Could not open properties file termux.properties: " + e.getMessage(), Toast.LENGTH_LONG).show();
|
||||
Log.e("termux", "Error loading props", e);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user