[sysprof/wip/chergert/sysprof-3] libsysprof: simplify error message



commit a034be3e63bba1f83d51f18e8af09ce4b3049ea1
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 10 14:51:31 2019 -0700

    libsysprof: simplify error message

 src/libsysprof/sysprof-perf-source.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)
---
diff --git a/src/libsysprof/sysprof-perf-source.c b/src/libsysprof/sysprof-perf-source.c
index 7880079..966d23d 100644
--- a/src/libsysprof/sysprof-perf-source.c
+++ b/src/libsysprof/sysprof-perf-source.c
@@ -650,17 +650,10 @@ sysprof_perf_source_start_pid (SysprofPerfSource  *self,
 
           if (fd == -1)
             {
-              if (errno == EPERM || errno == EACCES)
-                g_set_error (error,
-                             G_IO_ERROR,
-                             G_IO_ERROR_PERMISSION_DENIED,
-                             _("Sysprof requires authorization to access your computers performance 
counters."));
-              else
-                g_set_error (error,
-                             G_IO_ERROR,
-                             G_IO_ERROR_FAILED,
-                             _("An error occurred while attempting to access performance counters: %s"),
-                             g_strerror (errno));
+              g_set_error (error,
+                           G_IO_ERROR,
+                           G_IO_ERROR_FAILED,
+                           _("An error occurred while attempting to access performance counters"));
 
               sysprof_source_stop (SYSPROF_SOURCE (self));
 


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