mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-10-17 08:24:32 +02:00
Compare commits
1 Commits
v0.0.2-pre
...
v0.0.3-pre
Author | SHA1 | Date | |
---|---|---|---|
|
d18e134140 |
@@ -122,7 +122,13 @@ public class Main {
|
|||||||
ui.executeManager(new Runnable(){
|
ui.executeManager(new Runnable(){
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
new UpdateManager(uOptions, ui);
|
try {
|
||||||
|
new UpdateManager(uOptions, ui);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// TODO: better error message?
|
||||||
|
ui.handleExceptionAndExit(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@@ -110,16 +110,18 @@ public class UpdateManager {
|
|||||||
|
|
||||||
ui.submitProgress(new InstallProgress("Loading manifest file..."));
|
ui.submitProgress(new InstallProgress("Loading manifest file..."));
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
ManifestFile manifest;
|
ManifestFile manifest = null;
|
||||||
try {
|
try {
|
||||||
manifest = gson.fromJson(new FileReader(Paths.get(opts.packFolder, opts.manifestFile).toString()),
|
manifest = gson.fromJson(new FileReader(Paths.get(opts.packFolder, opts.manifestFile).toString()),
|
||||||
ManifestFile.class);
|
ManifestFile.class);
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) { // Do nothing
|
||||||
manifest = new ManifestFile();
|
|
||||||
} catch (JsonSyntaxException | JsonIOException e) {
|
} catch (JsonSyntaxException | JsonIOException e) {
|
||||||
ui.handleExceptionAndExit(e);
|
ui.handleExceptionAndExit(e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (manifest == null) {
|
||||||
|
manifest = new ManifestFile();
|
||||||
|
}
|
||||||
|
|
||||||
ui.submitProgress(new InstallProgress("Loading pack file..."));
|
ui.submitProgress(new InstallProgress("Loading pack file..."));
|
||||||
GeneralHashingSource packFileSource;
|
GeneralHashingSource packFileSource;
|
||||||
|
Reference in New Issue
Block a user