Commit a9c86711 authored by hengwen's avatar hengwen

Return 404 if map file not found

parent 28ce0777
Pipeline #140457 canceled with stage
in 15 seconds
......@@ -12,7 +12,6 @@ import server.restful.registry.ServiceRegistry;
import server.restful.service.MapService;
import server.restful.service.SimulationService;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -88,13 +87,8 @@ public class SimulationView {
try {
MapService mapService = new MapService(simulationService.getSimulationMap().getId(), simulationModel.getNumSectors());
return mapService.getSectorData(sectorIdx);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
throw new ResponseStatusException(HttpStatus.NOT_FOUND, "Map not found.", e);
}
return null;
}
;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment