When a C++ assert fails, the user sees the location and message (if any), and "Aborted (core dumped)". No stack trace; no ability for an enclosing Python wrapper to recover. throw behaves better -- it turns into a RuntimeException on the Python side, which is worth at least some context.
I am generally of the opinion that asserts should either be eliminated entirely because of this unfortunate behavior, or restricted to situations that represent bugs in Venture as opposed to bugs in user programs. And those that remain should have meaningful messages.
git grep indicates 375 asserts in Puma. Someone^TM ought to audit them in light of this desired policy.
When a C++ assert fails, the user sees the location and message (if any), and "Aborted (core dumped)". No stack trace; no ability for an enclosing Python wrapper to recover.
throw
behaves better -- it turns into a RuntimeException on the Python side, which is worth at least some context.I am generally of the opinion that asserts should either be eliminated entirely because of this unfortunate behavior, or restricted to situations that represent bugs in Venture as opposed to bugs in user programs. And those that remain should have meaningful messages.
git grep indicates 375 asserts in Puma. Someone^TM ought to audit them in light of this desired policy.