Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endlessly recursive error handling (0.8.9) #569

Open
powczarek22 opened this issue Feb 10, 2022 · 0 comments
Open

Endlessly recursive error handling (0.8.9) #569

powczarek22 opened this issue Feb 10, 2022 · 0 comments

Comments

@powczarek22
Copy link

https://github.com/impossibl/pgjdbc-ng/blob/develop/driver/src/main/java/com/impossibl/postgres/jdbc/ErrorUtils.java

Pass an instance of NoticeException and it loops until stack overflow

public static SQLException makeSQLException(String message, Exception cause) {

    if (cause instanceof SQLException) {
      return (SQLException) cause;
    }

    if (cause instanceof NoticeException) {
      return makeSQLException(message, cause);
    }

    return new PGSQLSimpleException(message, cause);
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant