// Subject: Macro errors are ignored in many cases // Author: Stein Rorvik // // The release notes of 1.52j says // "errors in macro run() statements are now reported using // a 'Macro Error' dialog that displays the line number." // While useful in itself, it seems that this fix has introduced // other problems. Many errors now do not stop the macro running // but lets it continue with unexpected results. // These regressions are fixed in the 1.52k63 daily build. //case 1 //the command is invalid due to no selection, but the macro //proceeds as if nothing happened run("Blobs (25K)"); run("Clear", "slice"); //case 2 //command is invalid since 16-bit images cannot be saved as GIF //throws no error, instead just produces an empty file and // proceeds macro execution run("T1 Head (2.4M, 16-bits)"); saveAs("GIF", getDirectory("temp") + "T1-Head.gif"); //case 3 //command is invalid since 16-bit images cannot be saved as GIF //asks for filename; an empty file is generated //then the interpreter throws an error and aborts macro //the error should perhaps have appeared before asking for filename run("T1 Head (2.4M, 16-bits)"); run("Gif..."); //case 4 //command is invalid because no images are open //the macro is aborted silently with no error run("Close All"); run("Scale...", "x=0.5 y=0.5"); //case 5 //command is invalid because no images are open //the macro is aborted properly with an error run("Close All"); run("Scale...");