mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 02:09:44 +02:00
GP-994: Improve error reporting when GADP-based models fail to start
This commit is contained in:
parent
7a92882ba3
commit
b4d2cb75ba
14 changed files with 80 additions and 16 deletions
|
@ -20,8 +20,7 @@ import java.util.concurrent.CompletableFuture;
|
|||
import java.util.concurrent.RejectedExecutionException;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import ghidra.async.AsyncUtils;
|
||||
import ghidra.async.TypeSpec;
|
||||
import ghidra.async.*;
|
||||
import ghidra.dbg.error.*;
|
||||
import ghidra.dbg.target.TargetMemory;
|
||||
import ghidra.dbg.target.TargetObject;
|
||||
|
@ -558,12 +557,16 @@ public interface DebuggerObjectModel {
|
|||
* @param ex the exception
|
||||
*/
|
||||
default void reportError(Object origin, String message, Throwable ex) {
|
||||
Throwable unwrapped = AsyncUtils.unwrapThrowable(ex);
|
||||
if (ex == null || DebuggerModelTerminatingException.isIgnorable(ex)) {
|
||||
Msg.warn(origin, message + ": " + ex);
|
||||
}
|
||||
else if (AsyncUtils.unwrapThrowable(ex) instanceof RejectedExecutionException) {
|
||||
else if (unwrapped instanceof RejectedExecutionException) {
|
||||
Msg.trace(origin, "Ignoring rejection", ex);
|
||||
}
|
||||
else if (unwrapped instanceof DisposedException) {
|
||||
Msg.trace(origin, "Ignoring disposal", ex);
|
||||
}
|
||||
else {
|
||||
Msg.error(origin, message, ex);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue