[xharness] Throw a helpful exception instead of NRE when a simulator can't be found.

This commit is contained in:
Rolf Bjarne Kvinge 2016-06-15 16:52:24 -07:00
Родитель ed1cbe003e
Коммит df326a1d59
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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 };