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(); let mut framework = framework.write().unwrap();
match framework.uninstall(&sender) { 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(); sender.send(InstallMessage::EOF).unwrap();
@ -234,7 +237,10 @@ impl Service for WebService {
} }
match framework.install(to_install, &sender, new_install) { 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(); 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 filtered_regex = package.source.match_regex.replace("#PLATFORM#", OS);
let regex = match Regex::new(&filtered_regex) { let regex = match Regex::new(&filtered_regex) {
Ok(v) => v, 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 // Find the latest release in here

View File

@ -115,7 +115,7 @@
<div class="column" v-else> <div class="column" v-else>
<h4 class="subtitle">Oh no!</h4> <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> </div>
</div> </div>