Improve error handling for CliPlugins
ClosedPublic

Authored by rthomsen on Oct 23 2016, 3:30 PM.

Details

Summary

This diff removes the ExtractionFailedPatterns regexp in CliProperties. Instead we take care of the error handling in the individual plugins by adding a pure virtual readExtractLine() method to CliInterface (similar to readListLine()). This way we can provide custom error messages to Part, instead of the generic Extraction failed due to an unexpected error (this message was also used for ListJob).

Test Plan

Test listing or extracting archives handled by CliPlugins with some error.

  • Multi-volume RAR archive with a missing volume.
  • Open Zip archive using Xz compression with clizip.
  • Open AES-encrypted Zip archive with clizip.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rthomsen updated this revision to Diff 7621.Oct 23 2016, 3:30 PM
rthomsen retitled this revision from to Improve error handling for CliPlugins.
rthomsen updated this object.
rthomsen edited the test plan for this revision. (Show Details)
rthomsen added a reviewer: elvisangelaccio.
rthomsen set the repository for this revision to R36 Ark.
rthomsen added a project: Ark.
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptOct 23 2016, 3:30 PM
rthomsen updated this revision to Diff 8118.Nov 13 2016, 2:27 PM
rthomsen updated this object.
rthomsen edited the test plan for this revision. (Show Details)
rthomsen edited the test plan for this revision. (Show Details)
elvisangelaccio requested changes to this revision.Nov 13 2016, 2:41 PM
elvisangelaccio edited edge metadata.
elvisangelaccio added inline comments.
plugins/cliunarchiverplugin/cliplugin.cpp
98

Let's remove the "Segmentation fault" pattern so you don't have to use a QVector here.

114

Same, drop "Segmentation fault"

This revision now requires changes to proceed.Nov 13 2016, 2:41 PM
rthomsen updated this revision to Diff 8123.Nov 13 2016, 6:16 PM
rthomsen edited edge metadata.
  • Remove the "Segmentation fault" regexp in cliunarchiverplugin, so we don't need the QVector.
  • Clizip: Fix detection of unsupported compression method.
rthomsen marked 2 inline comments as done.Nov 13 2016, 6:16 PM
elvisangelaccio accepted this revision.Nov 13 2016, 8:12 PM
elvisangelaccio edited edge metadata.
This revision is now accepted and ready to land.Nov 13 2016, 8:12 PM
This revision was automatically updated to reflect the committed changes.