From 90dbbf5ae4c8df60f80b6d7a80dcd2603c925ddb Mon Sep 17 00:00:00 2001 From: Dillon Nys Date: Wed, 28 Feb 2024 20:38:50 -0800 Subject: [PATCH] chore: Overrides `toString` for `CloudException` types. --- packages/celest_core/CHANGELOG.md | 4 ++++ packages/celest_core/lib/src/exception/cloud_exception.dart | 6 ++++++ packages/celest_core/pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/celest_core/CHANGELOG.md b/packages/celest_core/CHANGELOG.md index b737a7f4..077668af 100644 --- a/packages/celest_core/CHANGELOG.md +++ b/packages/celest_core/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.1 + +- Overrides `toString` for `CloudException` types. + ## 0.2.0 - Bumps minimum Dart SDK to 3.3 diff --git a/packages/celest_core/lib/src/exception/cloud_exception.dart b/packages/celest_core/lib/src/exception/cloud_exception.dart index 84e4082f..6f3d7ebd 100644 --- a/packages/celest_core/lib/src/exception/cloud_exception.dart +++ b/packages/celest_core/lib/src/exception/cloud_exception.dart @@ -15,6 +15,9 @@ class BadRequestException implements CloudException { @override final String message; + + @override + String toString() => 'BadRequestException: $message'; } /// {@template celest_core.exception.internal_server_exception} @@ -29,4 +32,7 @@ class InternalServerException implements CloudException { @override final String message; + + @override + String toString() => 'InternalServerException: $message'; } diff --git a/packages/celest_core/pubspec.yaml b/packages/celest_core/pubspec.yaml index dd0b7f11..a6bb16a4 100644 --- a/packages/celest_core/pubspec.yaml +++ b/packages/celest_core/pubspec.yaml @@ -1,6 +1,6 @@ name: celest_core description: Celest types and utilities shared between the client and the cloud. -version: 0.2.0 +version: 0.2.1 homepage: https://celest.dev repository: https://github.com/celest-dev/celest/tree/main/packages/celest_core