niidmore
asked on
handle exceptions
Hello there,
I know it is quite simple but I am still unable to make it work.
I want to catch exception in the scriptaculous script I have,
the script calls another functions
createNode('node1');
createNode('node2');
createNode('node3');
if there is no node2 object exist, it should simply ignore the call and not say -- node3 object not found
please advice.
regards
sam
I know it is quite simple but I am still unable to make it work.
I want to catch exception in the scriptaculous script I have,
the script calls another functions
createNode('node1');
createNode('node2');
createNode('node3');
if there is no node2 object exist, it should simply ignore the call and not say -- node3 object not found
please advice.
regards
sam
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Modify the catch block to display the error. It looks like the last childnode in your createEffect function is throwing the error, which causes the execution to flow the to catch block. This skips your other two createEffect calls.
try {
...
} catch(ex) {
alert(ex);
}
try {
...
} catch(ex) {
alert(ex);
}
ASKER
yes you are right ! could you also please let me know the fix.
much appreciate for your help.
regards
sam
much appreciate for your help.
regards
sam
No, I am not sure what the problem is exactly. I suggest that you download Firebug for Firefox and step through the code checking it with the debugger.
ASKER
ok thanks for your help though
ASKER
http://xxx.xxx.xxx.26/vanillasite/carlton.asp
If you please follow the url above, the actual script works only in IE but not in Firefox. Can you please see if there is something wrong?
thanks for looking.
cheers
sam