From df326a1d597c28f4976e5b111306465ba1c76f67 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 15 Jun 2016 16:52:24 -0700 Subject: [PATCH] [xharness] Throw a helpful exception instead of NRE when a simulator can't be found. --- tests/xharness/AppRunner.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs index edbb713401..c311c4e469 100644 --- a/tests/xharness/AppRunner.cs +++ b/tests/xharness/AppRunner.cs @@ -142,6 +142,8 @@ namespace xharness candidate = data; } } + if (candidate == null) + throw new Exception ($"Could not find simulator for runtime={simulator_runtime} and device type={simulator_devicetype}."); if (simulators == null) simulators = new SimDevice [] { candidate };