diff mbox series

[8/8] kernel-shark: Less scary error message from Capture dialog

Message ID 20190709155650.2345-9-y.karadz@gmail.com (mailing list archive)
State Accepted
Headers show
Series Fixes needed befor KS 1.0 | expand

Commit Message

Yordan Karadzhov July 9, 2019, 3:56 p.m. UTC
Most likely the reason for this error to occur is that the KernelShark GUI
is not open (was closed).

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 kernel-shark/src/KsCaptureDialog.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel-shark/src/KsCaptureDialog.cpp b/kernel-shark/src/KsCaptureDialog.cpp
index c877094..acba330 100644
--- a/kernel-shark/src/KsCaptureDialog.cpp
+++ b/kernel-shark/src/KsCaptureDialog.cpp
@@ -554,6 +554,9 @@  void KsCaptureDialog::_sendOpenReq(const QString &fileName)
 		socket->flush();
 		socket->disconnectFromServer();
 	} else {
-		_captureMon.print(socket->errorString());
+		QString error(socket->errorString());
+
+		error += "\n(maybe KernelShark GUI is not open)";
+		_captureMon.print(error);
 	}
 }