Fix bad exception
Squashed 'core/' changes from 64fcf7d..bfd1857

bfd1857 Merge commit '6cd4d66f3e294733e230156d7c016fc748f43fb6'
6cd4d66 Squashed 'db/' changes from b5338aa..0ea4bcb

git-subtree-dir: core
git-subtree-split: bfd1857689a6f79d2ef2ffa985befe240bf47c19
Merge commit '2fd8ee622e7b4379aa148cd334697429547ba8c4'