Skip to content
Commit 3fcd8425 authored by Ragnar Thomsen's avatar Ragnar Thomsen
Browse files

Improve error handling when loading plugins

Previously, if Archive::create() failed to load a plugin, a QInputDialog
was shown where the user could choose the mimetype of the archive. This
was not suitable anymore, since mimetype detection is much better now
and because we now try all registered plugins for a mimetype.

New behavior: When a plugin fails to load, two different error messages
can be shown:
1. No suitable plugin was found.
2. All suitable plugins failed to load.

Because we (potentially) try to load different plugins, which can fail
for different reasons (missing executables, broken plugin, etc.), error
message 2 can not be made more specific.

This was implemented by adding an alternative constructor for Archive
which takes an error code. Part::openFile() then checks if an error
message is found before continuing to load the interface, and if that is
the case displays one of the the error messages.

Differential Revision: D408
parent dbc392d3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment