From 6af709cc54d3f14155f34692716f598406d2ce6e Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sat, 16 Jun 2018 16:27:49 +0200 Subject: Some small reformattings. --- emulate/emulator.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'emulate/emulator.hpp') 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; } }; -- cgit v1.2.3-70-g09d2