minifix(GUI): handle image dialog and drive selector errors (#548)

Currently, if either `OSDialogService.selectImage()` or
`DriveSelectorService.open()` are rejected, we completely swallow the
errors, making very hard to debug certain problems.

This PR takes care of showing the usual error dialog for those cases.

Change-Type: patch
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
Juan Cruz Viotti 2016-06-30 14:30:39 -04:00 committed by GitHub
parent c434746a49
commit eb0d8d46cc

View File

@ -210,7 +210,7 @@ app.controller('AppController', function(
}
this.selectImage(image);
});
}).catch(this.handleError);
};
this.selectDrive = (drive) => {
@ -222,7 +222,9 @@ app.controller('AppController', function(
};
this.openDriveSelector = () => {
DriveSelectorService.open().then(this.selectDrive);
DriveSelectorService.open()
.then(this.selectDrive)
.catch(this.handleError);
};
this.reselectImage = () => {