Re: [PATCH v2 5/5] kernel-shark: Better formatting of the error messages from "Record"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 Aug 2019 18:58:11 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

> Make the message easier to read and understand by separating the
> QProcess's error and the Standard error.
> 
> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
> ---
>  kernel-shark/src/KsMainWindow.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
> index 651cf59..a3b5ce7 100644
> --- a/kernel-shark/src/KsMainWindow.cpp
> +++ b/kernel-shark/src/KsMainWindow.cpp
> @@ -1211,9 +1211,10 @@ void KsMainWindow::_captureError(QProcess::ProcessError error)
>  
>  void KsMainWindow::_captureErrorMessage(QProcess *capture)
>  {
> -	QString message = "Capture process failed:<br>";
> +	QString message = "Capture process failed: ";
>  
>  	message += capture->errorString();
> +	message += "<br>Standard Error :";

I changed the above to: "<br>Standard Error: ", as I added:

 echo "this is an error" >&2
 exit 1

to kshark-su-record and the current patch produces:

  ERROR:  Capture process failed: Unknown error
  Standard Error :this is an error

Where I think the below looks better:

  ERROR:  Capture process failed: Unknown error
  Standard Error: this is an error

-- Steve


>  	message += capture->readAllStandardError();
>  	_error(message, "captureFinishedErr", false, false);
>  }




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux