show white page when the image files in jar are missing

This commit is contained in:
huangyuhui
2017-02-25 19:14:08 +08:00
parent b4658463e1
commit 0dfd8af7d5
6 changed files with 113 additions and 149 deletions

View File

@@ -144,7 +144,7 @@ public final class Main implements Runnable {
try {
PluginManager.getPlugin(Class.forName(c));
} catch (ClassNotFoundException ex) {
LOGGER.log(Level.WARNING, "Class: " + c + " not found, please add your plugin jar to class path.", ex);
HMCLog.warn("Class: " + c + " not found, please add your plugin jar to class path.", ex);
}
} else if (s.startsWith("--help")) {
System.out.println("HMCL command line help");

View File

@@ -38,6 +38,7 @@ import java.util.jar.Pack200;
import java.util.logging.Level;
import java.util.zip.GZIPInputStream;
import org.jackhuang.hmcl.Main;
import org.jackhuang.hmcl.api.HMCLog;
import org.jackhuang.hmcl.api.event.SimpleEvent;
import org.jackhuang.hmcl.util.C;
import org.jackhuang.hmcl.core.MCUtils;
@@ -98,7 +99,7 @@ public class AppDataUpgrader extends IUpgrader {
} catch (JsonSyntaxException ex) {
f.delete();
} catch (IOException | PrivilegedActionException t) {
Main.LOGGER.log(Level.SEVERE, "Failed to execute newer version application", t);
HMCLog.err("Failed to execute newer version application", t);
}
}
@@ -131,7 +132,7 @@ public class AppDataUpgrader extends IUpgrader {
System.exit(0);
}
} catch (IOException ex) {
Main.LOGGER.log(Level.SEVERE, "Failed to create upgrader", ex);
HMCLog.err("Failed to create upgrader", ex);
}
else {
String url = C.URL_PUBLISH;
@@ -145,7 +146,7 @@ public class AppDataUpgrader extends IUpgrader {
try {
java.awt.Desktop.getDesktop().browse(new URI(url));
} catch (URISyntaxException | IOException e) {
Main.LOGGER.log(Level.WARNING, "Failed to browse uri: " + url, e);
HMCLog.err("Failed to browse uri: " + url, e);
Utils.setClipborad(url);
MessageBox.show(C.i18n("update.no_browser"));
}