diff options
Diffstat (limited to 'emulate/emulator.hpp')
| -rw-r--r-- | emulate/emulator.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/emulate/emulator.hpp b/emulate/emulator.hpp index fc33722..025c823 100644 --- a/emulate/emulator.hpp +++ b/emulate/emulator.hpp @@ -281,8 +281,14 @@ public: {} }; - void handle_instruction(_DInst inst) { - opcode_handlers.at(inst.opcode)(inst); + bool handle_instruction(_DInst inst) { + try { + opcode_handlers.at(inst.opcode)(inst); + } catch(std::exception const& e) { + std::cerr << "Encountered fatal error: " << e.what() << std::endl; + return false; + } + return true; } }; |
