I’m trying GtkFileDialog with Vala language, I think that GtkFileDialog has better design decision than GtkFileChooserNative and GtkFileChooserDialog, it brings better experiece to user.
Then I found GtkFileDialog will throw GError while user press ESC key or click Cancel button, it’s wired, because the cancel action is done by the user, it should not throw GError.
No, that’s not really what a GError means. A GError is an error that is recoverable at run time: it’s like an exception in programming languages that support that construct.
A user cancelling the dialog is perfectly equivalent to some other underlying process that cancels the operation: the file dialog is closed and there’s no selected file at the end.