Skip to content

Commit

Permalink
Catch builtin_exception
Browse files Browse the repository at this point in the history
  • Loading branch information
oremanj committed Dec 15, 2023
1 parent b46c92b commit d28d3ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/nanobind/nb_cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ bool try_cast(const detail::api<Derived> &value, T &out, bool convert = true) no
try {
out = caster.operator detail::cast_t<T>();
return true;
} catch (...) {
} catch (const nb::builtin_exception&) {
return false;
}
}
Expand Down

0 comments on commit d28d3ca

Please sign in to comment.