From bdc6c743c34a4262112561ff714f4c88f23faa0a Mon Sep 17 00:00:00 2001 From: Istvan Soos Date: Mon, 17 Mar 2025 19:17:55 +0100 Subject: [PATCH] Better exception message when SSL is not supported. --- CHANGELOG.md | 4 ++++ lib/src/v3/connection.dart | 4 +++- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea74c9b..e8a8e85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 3.5.5 + +- Better exception message when SSL is not supported. + ## 3.5.4 **Warning**: This version fixes the inconsistency of `3.5.3` by: diff --git a/lib/src/v3/connection.dart b/lib/src/v3/connection.dart index b421adc..3ea77fb 100644 --- a/lib/src/v3/connection.dart +++ b/lib/src/v3/connection.dart @@ -343,7 +343,9 @@ class PgConnectionImplementation extends _PgSessionBase implements Connection { adaptedStream = socket; } else { // This server does not support SSL - throw PgException('Server does not support SSL, but it was required.'); + throw PgException( + 'Server does not support SSL, but it was required (default configuration). ' + 'To disable secure connections, use `ConnectionSettings(sslMode: SslMode.disable)`.'); } } else { // We've listened to the stream already and sockets are single-subscription diff --git a/pubspec.yaml b/pubspec.yaml index b24e6df..4f0d279 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: postgres description: PostgreSQL database driver. Supports binary protocol, connection pooling and statement reuse. -version: 3.5.4 +version: 3.5.5 homepage: https://github.com/isoos/postgresql-dart topics: - sql