An IllegalStateException or 'pure' RuntimeException should only be thrown for actual bugs. For the following two situations I would prefer IllegalArgumentExceptions (http code=BAD REQUEST). Are there counter arguments?
IllegalStateException: No edge matches found for path. Too short? Sequence size 3
RuntimeException: Sequence is broken for submitted track at time step 29 (84 points). Too long distance to previous measurement? 4067m
An IllegalStateException or 'pure' RuntimeException should only be thrown for actual bugs. For the following two situations I would prefer IllegalArgumentExceptions (http code=BAD REQUEST). Are there counter arguments?