Calendar:Feature Implementations:Error Reporting
Calendar Error Reporing
This page descibes how I (garyvdm) think we can improve error reporting in Sunbird.
There are 3 places, where we need to cover error reporting:
- When a user is adding a new calendar.
- When a user is reloading an existing calendar.
- When a user is publishing changes to a calendar.
For all 3 areas, we will have a common piece of code to display errors. I'll call it the error displayer (ED) from now on. This will be a XBL or a XUL overlay (I'm not sure which yet.)
The ED will look similar to the error pages in Firefox. eg: it might display the following:
The ED must be able to handle the following errors:
- Unknown protocol.
- Unable to resolve server name.
- Response timeout.
- Server returned error code.
- Error in the format of the calendar returned. (eg: Malformed ICS file)
Adding a new calendar
The behavior of the last page of the Create New Calendar wizard needs to be changed. It currently adds the calendar to the list of calendars immediately, and the main window attempts to load the calendar - and errors are reported in a separate window.
How I think it should work is a follows:
- The wizard needs to try load the calendar before it adds it to the main app window. While it is trying to load the calendar, it will display this:
At this point the Finish button is disabled. But the user can cancel the loading and get out of the wizard by clicking Cancel.
- If the calendar loads successfully, it will be added to the calendar list in the main app window, and the wizard will display a success message (like it currently does.)
- If there is an error, we display the ED for the error. The user can then click back to change the URL if they have entered it incorrectly. They can also click Cancel to dismiss the wizard without adding the calendar
There are two things we can do with the finish button at this point (I'm not sure which is best.)
- Option 1: Disable the Finish button. Hence the user cannot add the Calendar if there is an error.
- Option 2: Enable the Finish button. If the user clicks Finish, the Calendar is added to the calendar list in the main app window, even though there is an error with it. We'll have to describe to the user that this is what clicking on Finish will do.
Reloading an existing calendar
If we try and reload an existing calendar and an error occurs, we will do the following:
- In the status bar, display an explanation icon and the text "An error occured, while loading a calendar file."
- In the calendar list box display an explanation icon next to the calendar, where the errors occurred.
- If the user clicks on the explanation icon, it displays a dialog box, with the ED, and a close button.
Publishing changes to a calendar
If there is an error while publishing changes to a calendar, the dialog box should display immediately.