Skip to content

Commit c21e5a6

Browse files
committed
Polishing
[#187]
1 parent 689e45e commit c21e5a6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/main/java/io/r2dbc/postgresql/PostgresqlConnectionFactory.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.reactivestreams.Publisher;
3838
import reactor.core.publisher.Flux;
3939
import reactor.core.publisher.Mono;
40+
import reactor.util.annotation.Nullable;
4041

4142
import java.util.ArrayList;
4243
import java.util.List;
@@ -147,7 +148,7 @@ private Throwable cannotConnect(Throwable throwable) {
147148
return throwable;
148149
}
149150

150-
return new R2dbcNonTransientResourceException(
151+
return new PostgresConnectionException(
151152
String.format("Cannot connect to %s:%d", this.configuration.getHost(), this.configuration.getPort()), throwable
152153
);
153154
}
@@ -206,4 +207,11 @@ private Mono<Void> setSchema(PostgresqlConnection connection) {
206207
.then();
207208
}
208209

210+
static class PostgresConnectionException extends R2dbcNonTransientResourceException {
211+
212+
public PostgresConnectionException(String msg, @Nullable Throwable cause) {
213+
super(msg, cause);
214+
}
215+
}
216+
209217
}

0 commit comments

Comments
 (0)