ComCat generates HTTP errors when it cannot find the event you're looking for. These trigger exceptions in the Java code, which were not being handled. I added handlers to catch these exceptions, and treat the exceptions the same as if ComCat had returned an empty set of results.
Note: I only modified the ComcatAccessor class in scratch.aftershockStatistics. There is another very similar ComcatAccessor class in scratch.aftershockStatisticsETAS. It should receive the same changes. I have not modified the other one because I am not set up to test scratch.aftershockStatisticsETAS. If you wish, I can modify the other ComcatAccessor and then you can test it. Note that the other ComcatAccessor also doesn't have the fix for the longitude wrap-around at 180 degrees.
Add exception handlers for calls to ComCat.
ComCat generates HTTP errors when it cannot find the event you're looking for. These trigger exceptions in the Java code, which were not being handled. I added handlers to catch these exceptions, and treat the exceptions the same as if ComCat had returned an empty set of results.
Note: I only modified the ComcatAccessor class in scratch.aftershockStatistics. There is another very similar ComcatAccessor class in scratch.aftershockStatisticsETAS. It should receive the same changes. I have not modified the other one because I am not set up to test scratch.aftershockStatisticsETAS. If you wish, I can modify the other ComcatAccessor and then you can test it. Note that the other ComcatAccessor also doesn't have the fix for the longitude wrap-around at 180 degrees.