WMLScript » Lang » Lang.abort

The mandatory errorDescription parameter can be any combination of a string and named variables describing the error, or an invalid returned by the browser.

Aborts the current code and returns control to the caller.

The Lang.abort function can be used to abort the WMLScript code that is currently being executed when a fatal error is detected. This is referred to as a program-specified abort. Control is returned to the calling WML program and an error is signaled.

The use of Lang.abort should be exclusively reserved for handling fatal errors. Non-fatal error detection and signaling can be handled by using the Lang.exit function.


extern function abortexample()
   Lang.abort("Fatal error!");

This is not a working code example, since we would have to create a fatal error to demonstrate this function.

Language(s): WML

See Also: