GP-1142: Catching error and returning empty map, allowing default logic.

This commit is contained in:
Dan 2021-07-21 13:24:34 -04:00
parent 51de35330c
commit ce073cd0f6

View File

@ -106,7 +106,10 @@ public class GdbModelTargetProcessMemory
setElements(List.of(), "Refreshed (while no process)");
return AsyncUtils.NIL;
}
return inferior.listMappings().thenAccept(this::updateUsingMappings);
return inferior.listMappings().exceptionally(ex -> {
Msg.error(this, "Could not list regions", ex);
return Map.of(); // empty map will be replaced with default
}).thenAccept(this::updateUsingMappings);
}
protected synchronized GdbModelTargetMemoryRegion getTargetRegion(GdbMemoryMapping mapping) {