Showing the changes to src/vm/vm_exception_handler.cpp (1 of 18 files). Show all
Unified · Split
| @@ -54,7 +54,7 @@ std::tuple<const handler_t *, vm_frame_t *, vm_pc_t> disvm::runtime::find_except · 53 unmodified lines | |||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | // Decrement the frame program counter. See raise instruction for details. | 56 | // Decrement the frame program counter. See raise instruction for details. |
| 57 | current_pc = static_cast<word_t>(current_frame->prev_pc() - 1); | 57 | current_pc = current_frame->prev_pc() - 1; |
| 58 | 58 | ||
| 59 | // Update the current module if it changes walking up the stack. | 59 | // Update the current module if it changes walking up the stack. |
| 60 | auto prev_mod_ref = current_frame->prev_module_ref(); | 60 | auto prev_mod_ref = current_frame->prev_module_ref(); |
| @@ -66,6 +66,6 @@ std::tuple<const handler_t *, vm_frame_t *, vm_pc_t> disvm::runtime::find_except · 5 unmodified lines | |||
| 66 | ++unwind_depth; | 66 | ++unwind_depth; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | auto faulting_module_name = faulting_module.module->module_name->str(); | 69 | // No handler found, return all invalid values. |
| 70 | throw unhandled_user_exception{ exception_id.str(), faulting_module_name, faulting_pc }; | 70 | return std::make_tuple(nullptr, nullptr, runtime_constants::invalid_program_counter); |
| 71 | } | 71 | } |