libsysprof: simplify error message

This commit is contained in:
Christian Hergert
2019-05-10 14:51:31 -07:00
parent 73426ff051
commit 40cafe03de

View File

@ -650,17 +650,10 @@ sysprof_perf_source_start_pid (SysprofPerfSource *self,
if (fd == -1) if (fd == -1)
{ {
if (errno == EPERM || errno == EACCES) g_set_error (error,
g_set_error (error, G_IO_ERROR,
G_IO_ERROR, G_IO_ERROR_FAILED,
G_IO_ERROR_PERMISSION_DENIED, _("An error occurred while attempting to access performance counters"));
_("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));
sysprof_source_stop (SYSPROF_SOURCE (self)); sysprof_source_stop (SYSPROF_SOURCE (self));