Skip to content

Commit

Permalink
src/org/nut/dynamatrix/Dynamatrix.groovy: when stack-tracing for debu…
Browse files Browse the repository at this point in the history
…g via exceptions, warn about their use (e.g. ST is not a problem HERE)
  • Loading branch information
jimklimov committed Oct 7, 2023
1 parent 363c410 commit 55173cf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/org/nut/dynamatrix/Dynamatrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ class Dynamatrix implements Cloneable {
(new Exception()).printStackTrace(new PrintWriter(stackTrace))
script.echo "Creating new Dynamatrix@${this.objectID}" +
(this.dynamatrixComment == null ? "" : ": ${this.dynamatrixComment}") +
" at: " + stackTrace.toString()
" at (via dummy Exception for tracing, do not worry): " +
stackTrace.toString()
}
}

Expand All @@ -647,7 +648,8 @@ class Dynamatrix implements Cloneable {
StringWriter stackTrace = new StringWriter()
(new Exception()).printStackTrace(new PrintWriter(stackTrace))
script.echo "Creating new Dynamatrix@${this.objectID} CLONE: ${this.dynamatrixComment}" +
" at: " + stackTrace.toString()
" at (via dummy Exception for tracing, do not worry): " +
stackTrace.toString()
}

return ret
Expand All @@ -665,7 +667,8 @@ class Dynamatrix implements Cloneable {
(new Exception()).printStackTrace(new PrintWriter(stackTrace))
script.echo "Creating new Dynamatrix@${this.objectID} CLONE" +
(this.dynamatrixComment == null ? "" : ": ${this.dynamatrixComment}") +
" at: " + stackTrace.toString()
" at (via dummy Exception for tracing, do not worry): " +
stackTrace.toString()
}

return ret
Expand Down

0 comments on commit 55173cf

Please sign in to comment.