2 eScript Questions: Error object initialization and variable destruction when passed by reference
Hi Siebel Community,
I've got two questions related to eScript that I have yet to get clear answers on.
1) How do we satisfy the semantic check for "e" when it's used in a catch statement?
2) Should an object passed by reference be set to null in the child script?
Details below:
1) Our most recent ES Review suggested adding the following lines to our catch block:
var sError = '';
sError = e.errText ? e.errText : e.toString();
TheApplication().RaiseErrorText(sError);
However now the syntax check throws "Variable e might not be initialized." for every function where this is implemented. Would it make sense to declare and initialize "e" at the beginning of the script? If so, what kind of value should it be initialized to?
I've got two questions related to eScript that I have yet to get clear answers on.
1) How do we satisfy the semantic check for "e" when it's used in a catch statement?
2) Should an object passed by reference be set to null in the child script?
Details below:
1) Our most recent ES Review suggested adding the following lines to our catch block:
var sError = '';
sError = e.errText ? e.errText : e.toString();
TheApplication().RaiseErrorText(sError);
However now the syntax check throws "Variable e might not be initialized." for every function where this is implemented. Would it make sense to declare and initialize "e" at the beginning of the script? If so, what kind of value should it be initialized to?
0