From 2d065122bcc888b2fac994ef2884c213b000dcef Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Fri, 26 Mar 2021 10:32:21 -0400 Subject: [PATCH] GP-0 eliminate unwanted stacktrace on cancel --- .../WindowsResourceReferenceAnalyzer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/plugin/prototype/MicrosoftCodeAnalyzerPlugin/WindowsResourceReferenceAnalyzer.java b/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/plugin/prototype/MicrosoftCodeAnalyzerPlugin/WindowsResourceReferenceAnalyzer.java index ef3bacf2e5..1aa148b046 100644 --- a/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/plugin/prototype/MicrosoftCodeAnalyzerPlugin/WindowsResourceReferenceAnalyzer.java +++ b/Ghidra/Features/MicrosoftCodeAnalyzer/src/main/java/ghidra/app/plugin/prototype/MicrosoftCodeAnalyzerPlugin/WindowsResourceReferenceAnalyzer.java @@ -69,8 +69,7 @@ public class WindowsResourceReferenceAnalyzer extends AbstractAnalyzer { @Override public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException { - runScript(program, set, "WindowsResourceReference.java", monitor); - return true; + return runScript(program, set, "WindowsResourceReference.java", monitor); } public boolean runScript(Program program, AddressSetView set, String scriptName, @@ -115,7 +114,7 @@ public class WindowsResourceReferenceAnalyzer extends AbstractAnalyzer { Msg.warn(this, "Unable to locate script class: " + e.getMessage(), e); } catch (CancelledException e) { - Msg.warn(this, "User cancelled script.", e); + // ignore } catch (Exception e) { Msg.warn("Error running script: " + scriptName + "\n" + e.getMessage(), e);