File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,11 @@ var ublox = (function () {
154154
155155 if ( successCallback != null ) {
156156 req . onload = ( event ) => {
157- successCallback ( req . response ) ;
157+ if ( req . status == 200 ) {
158+ successCallback ( req . response ) ;
159+ } else {
160+ failCallback ( event ) ;
161+ }
158162 } ;
159163 }
160164
@@ -164,13 +168,17 @@ var ublox = (function () {
164168 }
165169 }
166170
167- req . send ( null ) ;
171+ try {
172+ req . send ( null ) ;
173+ } catch ( error ) {
174+ GUI . alert ( i18n . getMessage ( "gpsAssistnowLoadDataError" ) ) ;
175+ console . log ( i18n . getMessage ( "gpsAssistnowLoadDataError" ) + ':' + error . toString ( ) ) ;
176+ }
168177 }
169178
170179
171180 function loadError ( event ) {
172181 GUI . alert ( i18n . getMessage ( "gpsAssistnowLoadDataError" ) ) ;
173- console . log ( i18n . getMessage ( "gpsAssistnowLoadDataError" ) + ':' + event . toString ( ) ) ;
174182 }
175183
176184 // For more info on assistnow, check:
You can’t perform that action at this time.
0 commit comments