mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 05:35:07 +01:00
Fix: Crash if log file is missing + Crash on random interrupt
This commit is contained in:
parent
696ebde527
commit
3bdbe41c13
@ -27,7 +27,7 @@ namespace lightSwitch::os {
|
||||
SvcHandler(svcId, state);
|
||||
} else {
|
||||
state.logger->write(Logger::ERROR, "An unhandled interrupt has occurred: {}", int_no);
|
||||
exit(int_no);
|
||||
state.cpu->StopExecution();
|
||||
}
|
||||
} catch (exception &e) {
|
||||
state.logger->write(Logger::WARN, "An exception occurred during an interrupt: {}", e.what());
|
||||
|
@ -41,11 +41,6 @@ public class LogActivity extends AppCompatActivity {
|
||||
try {
|
||||
InputStream inputStream = new FileInputStream(log_file);
|
||||
reader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.w("Logger", "IO Error during access of log file: " + e.getMessage());
|
||||
Toast.makeText(getApplicationContext(), getString(R.string.file_missing), Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
thread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -82,6 +77,11 @@ public class LogActivity extends AppCompatActivity {
|
||||
}
|
||||
});
|
||||
thread.start();
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.w("Logger", "IO Error during access of log file: " + e.getMessage());
|
||||
Toast.makeText(getApplicationContext(), getString(R.string.file_missing), Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user