Merge branch 'hung-at-map-settings-initialized' into 'master'

Capture exceptions while drawing spot arcs

See merge request gridtracker.org/gridtracker!91
rich-presence
Matthew Chambers 2021-04-07 01:39:39 +00:00
commit 0e9253d986
2 zmienionych plików z 266 dodań i 222 usunięć

Wyświetl plik

@ -1922,6 +1922,8 @@ function splitNoParen(s)
} }
function createSpotTipTable(toolElement) function createSpotTipTable(toolElement)
{
try
{ {
var now = timeNowSec(); var now = timeNowSec();
var myTooltip = document.getElementById("myTooltip"); var myTooltip = document.getElementById("myTooltip");
@ -2033,6 +2035,11 @@ function createSpotTipTable(toolElement)
g_passingToolTipTableString = worker; g_passingToolTipTableString = worker;
return 10; return 10;
} }
catch (err)
{
console.log("Unexpected error at createSpotTipTable", toolElement, err)
}
}
function createTooltTipTable(toolElement) function createTooltTipTable(toolElement)
{ {
@ -6817,6 +6824,8 @@ function handleWsjtxStatus(newMessage)
} }
if (toPoint) if (toPoint)
{
try
{ {
g_transmitFlightPath = flightFeature( g_transmitFlightPath = flightFeature(
[fromPoint, toPoint], [fromPoint, toPoint],
@ -6830,6 +6839,11 @@ function handleWsjtxStatus(newMessage)
true true
); );
} }
catch (err)
{
console.log("Unexpected error inside handleWsjtxStatus", err)
}
}
} }
g_weAreDecoding = false; g_weAreDecoding = false;
} }
@ -7309,6 +7323,8 @@ function handleWsjtxDecode(newMessage)
var fromPoint = getPoint(callsign.grid); var fromPoint = getPoint(callsign.grid);
var toPoint = getPoint(DEcallsign.grid); var toPoint = getPoint(DEcallsign.grid);
try
{
flightPath = flightFeature( flightPath = flightFeature(
[fromPoint, toPoint], [fromPoint, toPoint],
{ {
@ -7327,6 +7343,11 @@ function handleWsjtxDecode(newMessage)
g_flightPaths.push(flightPath); g_flightPaths.push(flightPath);
} }
catch (err)
{
console.log("Unexpected error inside handleWsjtxDecode 1", err)
}
}
} }
} }
else if ( else if (
@ -7350,6 +7371,8 @@ function handleWsjtxDecode(newMessage)
var Lon = g_worldGeoData[g_dxccToGeoData[callsign.dxcc]].lon; var Lon = g_worldGeoData[g_dxccToGeoData[callsign.dxcc]].lon;
var fromPoint = ol.proj.fromLonLat([Lon, Lat]); var fromPoint = ol.proj.fromLonLat([Lon, Lat]);
try
{
flightPath = flightFeature( flightPath = flightFeature(
[fromPoint, toPoint], [fromPoint, toPoint],
{ {
@ -7367,6 +7390,11 @@ function handleWsjtxDecode(newMessage)
flightPath.isQRZ = isQRZ; flightPath.isQRZ = isQRZ;
g_flightPaths.push(flightPath); g_flightPaths.push(flightPath);
}
catch (err)
{
console.log("Unexpected error inside handleWsjtxDecode 2", err)
}
var feature = shapeFeature( var feature = shapeFeature(
"qrz", "qrz",
@ -7445,6 +7473,8 @@ function handleWsjtxDecode(newMessage)
var fromPoint = getPoint(callsign.grid); var fromPoint = getPoint(callsign.grid);
var toPoint = ol.proj.fromLonLat(locality.properties.center); var toPoint = ol.proj.fromLonLat(locality.properties.center);
try
{
flightPath = flightFeature( flightPath = flightFeature(
[fromPoint, toPoint], [fromPoint, toPoint],
{ {
@ -7462,6 +7492,11 @@ function handleWsjtxDecode(newMessage)
flightPath.isQRZ = false; flightPath.isQRZ = false;
g_flightPaths.push(flightPath); g_flightPaths.push(flightPath);
} }
catch (err)
{
console.log("Unexpected error inside handleWsjtxDecode 3", err)
}
}
} }
} }
} }
@ -16114,6 +16149,8 @@ function spotFeature(center)
var g_spotTotalCount = 0; var g_spotTotalCount = 0;
function createSpot(report, key, fromPoint, addToLayer = true) function createSpot(report, key, fromPoint, addToLayer = true)
{
try
{ {
var LL = squareToLatLongAll(report.grid); var LL = squareToLatLongAll(report.grid);
@ -16192,6 +16229,12 @@ function createSpot(report, key, fromPoint, addToLayer = true)
); );
} }
} }
catch (err)
{
console.log("Unexpected error inside createSpot", report, err)
}
}
function redrawSpots() function redrawSpots()
{ {
let shouldSave = false; let shouldSave = false;

Wyświetl plik

@ -2412,7 +2412,8 @@ function updateInstances()
instancesDiv.innerHTML = worker; instancesDiv.innerHTML = worker;
instancesWrapper.style.display = ""; instancesWrapper.style.display = "";
} }
else { else
{
instancesDiv.innerHTML = ""; instancesDiv.innerHTML = "";
instancesWrapper.style.display = "none"; instancesWrapper.style.display = "none";
} }