dbstatecheck.py: print exception

Print exception being encountered by #952.