Skip to content

Commit

Permalink
fix: check size of chained exception list in getTraceMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
murali-shris committed Sep 27, 2022
1 parent cfda88a commit 7b9cafa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions at_commons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 3.0.26
* feat: Introduce notifyFetch verb
* fix: bug in at_exception_stack.dart
## 3.0.25
* fix: update regex to correctly parse negative values in ttl and ttb
* feat: add clientConfig to from verb syntax
Expand Down
6 changes: 4 additions & 2 deletions at_commons/lib/src/exception/at_exception_stack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ class AtExceptionStack implements Comparable<AtChainedException> {
String getTraceMessage() {
var size = _exceptionList.length;
String fullMessage = '';
fullMessage =
'${getIntentMessage(_exceptionList.first.intent)} caused by\n';
if (size > 0) {
fullMessage =
'${getIntentMessage(_exceptionList.first.intent)} caused by\n';
}
for (AtChainedException element in _exceptionList) {
size--;
fullMessage += element.message;
Expand Down

0 comments on commit 7b9cafa

Please sign in to comment.