Showing the changes to src/vm/execution_table.cpp (1 of 24 files). Show all
Unified · Split
| @@ -1678,7 +1678,7 @@ namespace · 1677 unmodified lines | |||
| 1678 | 1678 | ||
| 1679 | assert(r.module_ref != nullptr); | 1679 | assert(r.module_ref != nullptr); |
| 1680 | std::tie(handler, target_frame, handler_pc) = find_exception_handler(r.stack, *r.module_ref, faulting_pc, *exception_id); | 1680 | std::tie(handler, target_frame, handler_pc) = find_exception_handler(r.stack, *r.module_ref, faulting_pc, *exception_id); |
| 1681 | if (handler == nullptr && target_frame == nullptr && handler_pc == runtime_constants::invalid_program_counter) | 1681 | if (handler == nullptr) |
| 1682 | { | 1682 | { |
| 1683 | if (tool_dispatch != nullptr) | 1683 | if (tool_dispatch != nullptr) |
| 1684 | tool_dispatch->on_exception_unhandled(r, *exception_id, *e); | 1684 | tool_dispatch->on_exception_unhandled(r, *exception_id, *e); |
| @@ -1687,7 +1687,7 @@ namespace · 2 unmodified lines | |||
| 1687 | throw unhandled_user_exception{ exception_id->str(), faulting_module_name, faulting_pc }; | 1687 | throw unhandled_user_exception{ exception_id->str(), faulting_module_name, faulting_pc }; |
| 1688 | } | 1688 | } |
| 1689 | 1689 | ||
| 1690 | assert(target_frame != nullptr); | 1690 | assert(target_frame != nullptr && handler_pc != runtime_constants::invalid_program_counter); |
| 1691 | 1691 | ||
| 1692 | // Now that we know the exception has a handler, take a reference. | 1692 | // Now that we know the exception has a handler, take a reference. |
| 1693 | e->add_ref(); | 1693 | e->add_ref(); |