Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ij/macro/Interpreter.java

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, line 1380 needs to be
String truncatedLine = line;

Original file line number Diff line number Diff line change
Expand Up @@ -1373,7 +1373,11 @@ void error (String message) {
instance = null;
if (showMessage && message!=null) {
String line = getErrorLine();
done = true;
done = true;
if (line.length()>120)
String truncatedLine = line.substring(0,119);
else
truncatedLine = line;
Frame f = WindowManager.getFrame("Debug");
TextPanel panel = null;
if (showVariables && f!=null && (f instanceof TextWindow)) { //clear previous content
Expand All @@ -1390,7 +1394,7 @@ void error (String message) {
calledFrom += "\t\t(called from line " + theline +")\n";
}
}
showError("Macro Error", message+" in line "+lineNumber +"\n" + calledFrom +" \n"+line.substring(0,119)+"...", variables);
showError("Macro Error", message+" in line "+lineNumber +"\n" + calledFrom +" \n"+truncatedLine+"...", variables);
f = WindowManager.getFrame("Debug");
if (showVariables && f!=null && (f instanceof TextWindow)) {
TextWindow debugWindow = (TextWindow)f;
Expand Down