| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the panic() function provides overwhelming messages available
for developers but meaningless to users, the way to deal with error
output is simplified.
There are two panic()'s that are fixed:
* The one in parseArbitraryDateWithYear() function.
This function is the possible endpoint of adding a todo or editing
dues. Instead of calling panic(), now it outputs the specific
parsing error, and then terminate itself by os.Exit().
* The one in formatDue() function
This function is responsible for parsing the due information of a
given todo. If the todos being added previously have passed the
checking, then there is no reason that a due fails the format
check here, except for the corruption of the todo file.
|