Skip to content

Commit

Permalink
Fix lint - remove unused exceptions variables
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Aug 21, 2024
1 parent c1318ad commit f3f06eb
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export abstract class LayerBaseDialogComponent extends BaseMapComponent {
if (response && response.name) {
this.layerData.key = response.name;
}
} catch (ex) {
} catch {
// ignore error
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class SearchComponent extends BaseMapComponent {
this.selectResults(searchContext, searchContext.searchResults[0]);
}
this.selectFirstSearchResults = false;
} catch (ex) {
} catch {
this.toastService.warning(this.resources.unableToGetSearchResults);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class PublicPoiSidebarComponent extends BaseMapComponent implements OnDes
this.close();
}
}
} catch (ex) {
} catch {
this.toastService.warning(this.resources.unableToFindPoi);
this.close();
} finally {
Expand Down Expand Up @@ -285,7 +285,7 @@ export class PublicPoiSidebarComponent extends BaseMapComponent implements OnDes
}
this.toastService.success(this.resources.dataUpdatedSuccessfullyItWillTakeTimeToSeeIt);
this.clear();
} catch (ex) {
} catch {
this.toastService.confirm({ message: this.resources.unableToSaveData, type: "Ok" });
} finally {
this.isLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class DataContainerService {
this.store.dispatch(new SetFileUrlAndBaseLayerAction(url, baseLayer));
data.baseLayer = this.stringToBaseLayer(baseLayer);
this.setData(data, this.runningContextService.isCapacitor);
} catch (ex) {
} catch {
this.toastService.warning(this.resources.unableToLoadFromUrl);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class LayersService {
for (const toRemove of baselayerToRemove) {
this.store.dispatch(new RemoveBaseLayerAction(toRemove.key));
}
} catch (error) {
} catch {
this.loggingService.warning("[Layers] Unable to sync user layer from server - using local layers");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class OsmTokenInterceptor implements HttpInterceptor {
let token = "";
try {
token = this.store.selectSnapshot((s: ApplicationState) => s.userState).token;
} catch (ex) {
} catch {
// store is not ready yet
}

Expand Down
2 changes: 1 addition & 1 deletion IsraelHiking.Web/src/application/services/poi.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ export class PoiService {
}
}
}
} catch (ex) {
} catch {
this.loggingService.warning("[POIs] Unable to sync categories, using local categories");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class ShareUrlsService {
this.loggingService.warning(`[Shares] Cached share is outdated ${shareUrlId}, fetching it again...`);
shareUrl = await this.getShareFromServerAndCacheIt(shareUrlId, 5000);
return shareUrl;
} catch (ex) {
} catch {
this.loggingService.error(`[Shares] Failed to get share fast ${shareUrlId}, refreshing in the background`);
this.getShareFromServerAndCacheIt(shareUrlId); // don't wait for it...
return shareUrl;
Expand Down

0 comments on commit f3f06eb

Please sign in to comment.