Handle errors better in KDevFormatFile::executeCommand()

Authored by igorkushnir on Apr 7 2020, 5:41 PM.

Description

Handle errors better in KDevFormatFile::executeCommand()

  • Don't try to execute an empty command.
  • Make error messages refer to a command-line interpreter rather than to the command passed to it. Note that kdev_format_source did not detect when a user-specified command failed to start or crashed.
  • Warn when the command-line interpreter exits with a non-zero code. A non-zero exit code likely means that the process executed by the interpreter failed to start, crashed or reported failure. It can also be a nonfatal error report from the user-supplied command. Therefore let kdev_format_source report it as a warning, not an error.

Details

Committed
igorkushnirMay 2 2020, 4:28 PM
Parents
R32:66e4f3b3847d: grepview: search in hidden files and directories
Branches
Unknown
Tags
Unknown