New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JobResult::error doesn't result in message box #1600
Comments
|
The problem is that you're running the job (partitioning) the moment you leave the page. And you log the error result, and then carry on as if nothing is the matter. Normal processing runs jobs in the exec phase, and Calamares knows all about handling errors from jobs in the exec phase. That's where the pop-up comes from, as well as emergency shut-down support and all the rest. |
|
The ViewManager does have a method for this, though: This kind of fatal error will exit the installer, though. |
|
Aaah, that makes sense. Thanks for the detailed answers! I'll close this then, not a problem in Calamares. |
Stop the installation if the partition job does not finish successfully instead of carrying on and failing later on. While at it, elaborate some more on why it is necessary to call the partition job early. Related: calamares/calamares#1600
Stop the installation if the partition job does not finish successfully instead of carrying on and failing later on. While at it, elaborate some more on why it is necessary to call the partition job early. Related: calamares/calamares#1600
ollieparanoid commentedDec 18, 2020
I would have expected that returning
JobResult::errorin a job'sexec()opens a message box and shows the error to the user. However, with this job I wrote:https://github.com/calamares/calamares-extensions/blob/0d057478b026de73aaa5be2df9ea4a01231818ab/modules/mobile/PartitionJob.cpp#L110
...the error is written to the log, but not shown to the user. Calamares then continues with the next job, mount in my case, and this one fails here and does show a message box to the user:
calamares/src/modules/mount/main.py
Line 128 in 2ccd5a2
The first error message would have been much more useful, the second is rather irritating because that's not the original error.
So I'm wondering, is it possible to make my job show a message box, just like the (python) mount job? Is this a bug in my code or in calamares?
Thanks!
The text was updated successfully, but these errors were encountered: