mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-03 10:53:49 +00:00
Added meaningful error message when connection to TraTrac server fails
This commit is contained in:
1 parent
6f6eb3cc7e
commit
ac2dc8cb96
1 file changed
+7
+7
@@ -57,6 +57,13 @@ public class RaceTrackerImpl implements Listener, RaceTracker {
|
||||
throws URISyntaxException, MalformedURLException, FileNotFoundException {
|
||||
// Read event data from configuration file
|
||||
tractracEvent = KeyValue.setup(paramURL);
|
||||
|
||||
// can happen that tractrac event is null (occurs when there is no internet connection)
|
||||
// so lets raise some meaningful exception
|
||||
if (tractracEvent == null) {
|
||||
throw new RuntimeException("Connection failed. Could not connect to " + paramURL);
|
||||
}
|
||||
|
||||
// Initialize data controller using live and stored data sources
|
||||
controller = new DataController(liveURI, storedURI, this);
|
||||
// Start live and stored data streams
|
||||
|
||||
Reference in new issue
Block a user