stage-1: More useful error handler #239
First, the error handler now reserves most of the space for the error message.
Why didn't it before? Because it was conceived before we could print messages! We only had colours available to us to provide some kind of messaging. This is also why there was that sad-phone image; we couldn't show text, but we could show pictures, so let's make it obvious that things are wrong.
Thus, the sad phone is now gone, replaced with only a sad face icon at the top as a throw-back to the old times.
We're still providing the color-coded backgrounds, I think it is going to end-up useful, in case of vague bug reports. E.g. we'll know for a brown-ish error that init failed in an unexpected manner (exception).
Next, showing errors is great, but that's not the only thing we want to do on failure.
This is why we now have actions to do on failure! By default, a count-down is shown. Canceling it shows us a couple more options we can use.
The actions will show platform-specific options just like the recovery GUI does.
It might be of interest to allow spawning the recovery applet anyway, either as PID 1, or not. With an improved recovery applet that can handle some tasks like starting the usb networking or starting a background serial shell, even a foreground serial shell, that could help end-users in a bind.
Though, that might also require that we handle stage-1 failures in a less crashy way, and rather than kill our custom init, keep it going. Otherwise things could get messy if we implement them multiple times.
Anyway, these are all improvements for the future.
The command-line arguments are not great for structured data.
The applet isn't any more graceful yet, but this is where things can finally get interesting.