Skip to content

Commit

Permalink
Merge pull request #5 from /issues/4-seq-client-exception-tostring
Browse files Browse the repository at this point in the history
Add a `toString` override to `SeqClientException`
  • Loading branch information
ricardoboss authored Jun 5, 2024
2 parents 9f33365 + 36aa7ea commit a6940c6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/src/seq_client_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,19 @@ class SeqClientException implements Exception {

/// The stack trace of the exception that caused this exception, if any.
final StackTrace? innerStackTrace;

@override
String toString() {
final buffer = StringBuffer()
..write('SeqClientException: ')
..write(message);

if (innerException != null) {
buffer
..write('; innerException: ')
..write(innerException);
}

return buffer.toString();
}
}

0 comments on commit a6940c6

Please sign in to comment.