exception handling for route parsing