Add logging for install/uninstall errors

This commit is contained in:
James 2018-08-04 16:11:49 +10:00
parent 8f24384bd0
commit a9e51af7e0
3 changed files with 10 additions and 4 deletions

View file

@ -164,7 +164,10 @@ impl Service for WebService {
let mut framework = framework.write().unwrap();
match framework.uninstall(&sender) {
Err(v) => sender.send(InstallMessage::Error(v)).unwrap(),
Err(v) => {
eprintln!("Uninstall error occurred: {:?}", v);
sender.send(InstallMessage::Error(v)).unwrap();
},
_ => {}
}
sender.send(InstallMessage::EOF).unwrap();
@ -234,7 +237,10 @@ impl Service for WebService {
}
match framework.install(to_install, &sender, new_install) {
Err(v) => sender.send(InstallMessage::Error(v)).unwrap(),
Err(v) => {
eprintln!("Install error occurred: {:?}", v);
sender.send(InstallMessage::Error(v)).unwrap();
},
_ => {}
}
sender.send(InstallMessage::EOF).unwrap();

View file

@ -54,7 +54,7 @@ impl Task for ResolvePackageTask {
let filtered_regex = package.source.match_regex.replace("#PLATFORM#", OS);
let regex = match Regex::new(&filtered_regex) {
Ok(v) => v,
Err(v) => return Err(format!("An error occured while compiling regex: {:?}", v)),
Err(v) => return Err(format!("An error occurred while compiling regex: {:?}", v)),
};
// Find the latest release in here

View file

@ -115,7 +115,7 @@
<div class="column" v-else>
<h4 class="subtitle">Oh no!</h4>
<div>A error occured during installation. Please retry!</div>
<div>A error occurred during installation. Please retry!</div>
</div>
</div>
</div>