@@ -197,7 +197,7 @@ private TransportNetworkConfig loadNetworkConfig (String networkId) {
197197 * If we did not find a cached network, build one from the input files. Should throw an exception rather than
198198 * returning null if for any reason it can't finish building one.
199199 */
200- private @ Nonnull TransportNetwork buildNetwork (String networkId ) {
200+ private @ Nonnull TransportNetwork buildNetwork (String networkId ) throws IOException {
201201 TransportNetwork network ;
202202 TransportNetworkConfig networkConfig = loadNetworkConfig (networkId );
203203 if (networkConfig == null ) {
@@ -225,14 +225,10 @@ private TransportNetworkConfig loadNetworkConfig (String networkId) {
225225 network .rebuildLinkedGridPointSet (buildGridsForModes );
226226
227227 // Cache the serialized network on the local filesystem and mirror it to any remote storage.
228- try {
229- File cacheLocation = FileUtils .createScratchFile ();
230- KryoNetworkSerializer .write (network , cacheLocation );
231- fileStorage .moveIntoStorage (getR5NetworkFileStorageKey (networkId ), cacheLocation );
232- } catch (Exception e ) {
233- // Tolerate exceptions here as we do have a network to return, we just failed to cache it.
234- LOG .error ("Error saving cached network, returning the object anyway." , e );
235- }
228+ File cacheLocation = FileUtils .createScratchFile ();
229+ KryoNetworkSerializer .write (network , cacheLocation );
230+ fileStorage .moveIntoStorage (getR5NetworkFileStorageKey (networkId ), cacheLocation );
231+
236232 return network ;
237233 }
238234
0 commit comments