Error Handling
There are two way's to handle errors. IntraLaunch can display an error dialog box itself, or pass back an
return code of '0' or '1' depending
on whether the previous operation that it previously attempted was
a success or not. Both are demonstrated below. The Try It button will demonstrate
a simple IntraLaunch error box using the showerrors: 'true' parameter. As you can
see the program: 'notpad.exe' is spelt incorrectly, hence the error. Settings showerrors: 'false'
will stop IntraLaunch from opening it's own error dialog box and leave you to do something via
Javascript such as forward the user to a support page.
IntraLaunch will return "run" as part of its return code which signifies the return code is from a previous execution operation. As opposed to "dir", "deletefile", "deletefolder" which are used in file management and do not apply here. Note all IntraLaunch objects on the page will call funcIntraLaunchLastOpResult when they execute. To help differentiate which object is returning what code you can pass an identifier (typically the HTML element's ID) through and check for it on return (see responseIntraLaunchDOMElement) using the options: 'some_id' parameter as shown below.
IntraLaunch will return "run" as part of its return code which signifies the return code is from a previous execution operation. As opposed to "dir", "deletefile", "deletefolder" which are used in file management and do not apply here. Note all IntraLaunch objects on the page will call funcIntraLaunchLastOpResult when they execute. To help differentiate which object is returning what code you can pass an identifier (typically the HTML element's ID) through and check for it on return (see responseIntraLaunchDOMElement) using the options: 'some_id' parameter as shown below.