Skip to content

Commit

Permalink
fix(core.manager): partKey不正确时及时抛出异常
Browse files Browse the repository at this point in the history
  • Loading branch information
shifujun committed Dec 1, 2021
1 parent 004c6c5 commit 4a2542d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ public final void onInstallCompleted(PluginConfig pluginConfig) {

protected InstalledPlugin.Part getPluginPartByPartKey(String uuid, String partKey) {
InstalledPlugin installedPlugin = mInstalledDao.getInstalledPluginByUUID(uuid);
if (installedPlugin != null) {
return installedPlugin.getPart(partKey);
if (installedPlugin == null) {
throw new RuntimeException("没有找到uuid:" + uuid);
}
throw new RuntimeException("没有找到Part partKey:" + partKey);
InstalledPlugin.Part part = installedPlugin.getPart(partKey);
if (part == null) {
throw new RuntimeException("没有找到Part partKey:" + partKey);
}
return part;
}

protected InstalledPlugin getInstalledPlugin(String uuid) {
Expand Down

0 comments on commit 4a2542d

Please sign in to comment.