Define custom error messages
throw and detect custom error messages based on non-fatal database errors