corebenchrunner: Use robust error logic


Using match-statements to catch errors can be unsafe. If there are
multiple error-types, a match-statement targeted at the wrong one can
let errors fall through. A bug like this was fixed recently. This commit
attempts to guard against cases like that by simplifying the error
hierarchy, removing all types but one, and by using simpler
if-statements instead of match-statements where this makes sense.

Change-Id: I4b4307b9b94d98833cfb26ac86095f551e918470
Reviewed-by: Daniel Smith <daniel.smith@qt.io>
commitaf5733d3a94ddb37c6b424402c9bc0af6d3f445b
parent921cdd3e19ce7658340e9ae6d1e2288bca27a9b7
authorAudun Sutterud <audun.sutterud@qt.io>
committerAudun Sutterud <audun.sutterud@qt.io>
commit timeTue, 16 Apr 2024 14:32:18 +0200