feat(shorebird_code_push): override toString in exceptions (#266)
Co-authored-by: Felix Angelov <felix@shorebird.dev>
This commit is contained in:
@@ -26,6 +26,9 @@ class ReadPatchException implements Exception {
|
||||
|
||||
/// The human-readable error message.
|
||||
final String message;
|
||||
|
||||
@override
|
||||
String toString() => '[ShorebirdUpdater] ReadPatchException: $message';
|
||||
}
|
||||
|
||||
/// {@template update_exception}
|
||||
@@ -41,6 +44,11 @@ class UpdateException implements Exception {
|
||||
|
||||
/// The reason the update failed.
|
||||
final UpdateFailureReason reason;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '[ShorebirdUpdater] UpdateException: $message (${reason.name})';
|
||||
}
|
||||
}
|
||||
|
||||
/// Log message when the Shorebird updater is unavailable in the current
|
||||
|
||||
Reference in New Issue
Block a user