Fixed benchmark not stopping on database exceptions

Fixes #1788