Dealing with system errors
System errors fall into these categories:
- Uncaught application errors: These are errors that can be caught and handled within a VoiceXML application but were not. Examples include error.badfetch, error.semantic, and so on.
- Runtime platform errors: These errors include Voice Browser service security errors and other errors that can get thrown when the platform malfunctions. Application developers may not necessarily be able to catch these.
By default, if the Voice Browser service encounters a system error, it plays the prompt specified with the browser.systemErrorPrompt service property. You can customize this behavior so that the Voice Browser service loads a specific page when a system error is encountered. You do so by setting the following service properties, as appropriate:
- browser.errorPage: This property lets you specify the VoiceXML page to load when any system error is encountered (includes platform errors and uncaught application errors). For example:
browser.errorPage=http://localhost:8090/Errors/syserrors.vxml
- browser.errorPage.initial_page: This property lets you specify the VoiceXML page to load based on the initial page of the phone call when a system error is encountered. The value of initial_page is the value set for the application in the Voice Browser Service Group Properties window, under the Applications tab. For example:
browser.errorPage.http://localhost:8090/MyApp/Welcome.vxml
=http://localhost:8090/Errors/syserrors.vxml
The Voice Browser service handles system errors as follows. When a call comes in, the Voice Browser service tries to create a reference to the error page. It first tries to create a reference to the application-specific error page (set with property browser.errorPage.initial_page) and, if the application-specific page cannot be found, it backs off to the generic page (set with service property browser.errorPage). It does not attempt to load or execute the error page, but only tries to create a reference to it. If it cannot create a reference to any of the error pages, error pages are ‘disabled’.
If a system error occur during a call and the error pages are not disabled, the Voice Browser service executes the error page. If that fails (for example, because the URL is incorrect), or if the error pages are disabled, the Voice Browser service plays the default system error prompt (the browser.systemErrorPrompt message).