mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-24 19:56:37 +00:00
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:
parent
c434746a49
commit
eb0d8d46cc
@ -210,7 +210,7 @@ app.controller('AppController', function(
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.selectImage(image);
|
this.selectImage(image);
|
||||||
});
|
}).catch(this.handleError);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.selectDrive = (drive) => {
|
this.selectDrive = (drive) => {
|
||||||
@ -222,7 +222,9 @@ app.controller('AppController', function(
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.openDriveSelector = () => {
|
this.openDriveSelector = () => {
|
||||||
DriveSelectorService.open().then(this.selectDrive);
|
DriveSelectorService.open()
|
||||||
|
.then(this.selectDrive)
|
||||||
|
.catch(this.handleError);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.reselectImage = () => {
|
this.reselectImage = () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user