File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ namespace zenkit {
502502 template <typename R, typename ... P>
503503 void override_function (std::string_view name, std::function<R(P...)> const & callback) {
504504 auto * sym = find_symbol_by_name (name);
505- if (sym == nullptr ) throw DaedalusVmException { " symbol not found " };
505+ if (sym == nullptr ) throw DaedalusSymbolNotFound {std::string {name} };
506506 if (sym->is_external ()) throw DaedalusVmException {" symbol is already an external" };
507507
508508 if constexpr (!std::same_as<void , R>) {
@@ -571,8 +571,8 @@ namespace zenkit {
571571 // / \param callback The C++ function to register as the external.
572572 void override_function (std::string_view name, std::function<DaedalusNakedCall(DaedalusVm&)> const & callback) {
573573 auto * sym = find_symbol_by_name (name);
574- if (sym == nullptr ) throw DaedalusVmException { " symbol not found " };
575- if (sym->is_external ()) throw DaedalusVmException {" symbol is already an external" };
574+ if (sym == nullptr ) throw DaedalusSymbolNotFound {std::string {name} };
575+ if (sym->is_external ()) throw DaedalusVmException {" symbol " + sym-> name () + " is already an external" };
576576
577577 _m_function_overrides[sym->address ()] = [callback](DaedalusVm& machine) { callback (machine); };
578578 }
You can’t perform that action at this time.
0 commit comments