Make the non-existent event code a bit stricter

Actually check the errno setting.

This issue was actually causing some confusion with PAPI.