You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The EventProvider makes good use of exception-driven programming of the form:
try
{
open/lookup/whatever_event()
}
catch
{
//event does not exist is not openable etc.
try_next_source()
}
besides try-catch cascades being ugly as all balls, I burned myself while trying to implement pmu-events support (getting events via the same interface perf uses so we match perf events 1:1) with some shenanigans that are probably half constructed objects (?).
Anyways, I think replacing the exception part with std::optional or just returning some kind of EventDescription that is tagged as "invalid" would be better. (The latter is afaik already the direction we are moving in, in #340 )
The text was updated successfully, but these errors were encountered:
The EventProvider makes good use of exception-driven programming of the form:
besides try-catch cascades being ugly as all balls, I burned myself while trying to implement pmu-events support (getting events via the same interface perf uses so we match perf events 1:1) with some shenanigans that are probably half constructed objects (?).
Anyways, I think replacing the exception part with std::optional or just returning some kind of EventDescription that is tagged as "invalid" would be better. (The latter is afaik already the direction we are moving in, in #340 )
The text was updated successfully, but these errors were encountered: