Bug 281

Summary: Delayed error message for invalid station name input
Product: Group 9: Route Planning Reporter: Henry <728970038zjh>
Component: InterfaceAssignee: qiyuliang2-c
Status: RESOLVED FIXED    
Severity: normal CC: qiyuliang2-c, zhanjiang2-c, zixuan.huang
Priority: Normal    
Version: 1.0   
Hardware: PC   
OS: Mac OS   

Description Henry 2018-12-09 12:13:01 HKT
Step to reproduce:
1. Run the program. In the "Route Planning System" menu, input 1 to choose "GetRoute". Then in the "GetRoute" menu, input 2 to choose "SearchByLeastTrans".
2. For "Please enter start station:", input Kowlooon Tong. Note that this input is invalid.
3. For "Please enter end station:", input Airport. Note that this input is valid.

Actual result:
After step 3, system prints "Invalid input!".

Expected result:
After step 2, system prints "Invalid input!" and restarts the input.

This problem is important as the actual message cannot specify which input is incorrect. If the first output is wrong, user should not waste the time to input the second station.

Please add a exception catcher right after the first input.
Comment 1 Henry 2018-12-09 12:18:41 HKT
And I just tested this in the SearchByTime option. It has the same problem.

Step to reproduce:
1. Run the program. In the "Route Planning System" menu, input 1 to choose "GetRoute". Then in the "GetRoute" menu, input 1 to choose "SearchByTime".
2. For "Please enter start station:", input Kowlooon Tong. Note that this input is invalid.
3. For "Please enter end station:", input Airport. Note that this input is valid.

Actual result:
After step 3, system prints "Invalid input!".

Expected result:
After step 2, system prints "Invalid input!" and restarts the input.

Please fix this while you are at it.
Comment 2 qiyuliang2-c 2018-12-09 12:34:10 HKT
Fixed.