started new way of testing for Database error classes and exceptions