mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof: simplify error message
This commit is contained in:
@ -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));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user