Skip to content

Commit

Permalink
Added a toString override to SeqClientException
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoboss committed Jun 5, 2024
1 parent 9f33365 commit 36aa7ea
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 36aa7ea

Please sign in to comment.