[BUGFIX] Check for exceptions instead of number of affected rows