%GetCallChain function
Function |
The function gets back complete series of callings (CALL actions) that
caused its execution. |
Declaration |
|
Parameters |
None. |
Example |
Example shows the return value of the function (in the procedure Procx of the script
E.C3) when calling remote procedures from the scripts E.C1, E.C2 a
E.C3. Execution of the procedures begins in the initialization part of the script
E.C1.
;******************* E.C1 *******************
PROCEDURE Proc1x
CALL [E.C2] Proc2 ON
SELF.EVH ; line 3
END Proc1x
PROCEDURE ProcB
CALL Proc1x ;
line 7
END ProcB
BEGIN
CALL ProcB ;
line 11
END
;********************************************
;*********** Server event: E.C2 *************
RPC PROCEDURE Proc2
CALL [E.C3] Proc3 ON SELF.EVH ;
line 3
END Proc2
BEGIN
END
;********************************************
;*********** Server event: E.C3 *************
PROCEDURE Procx
TEXT _callChain
_callChain := %GetCallChain()
; line 4.
END Procx
RPC PROCEDURE Proc3
CALL Procx ; line 8
END Proc3
BEGIN
END
;********************************************
The value of local variable _callChain of procedure Procx
in script E.C3.Procx: 4
SELF.EVH;E.C3( 24791) 1438;Proc3: 8
SELF.EVH;E.C2( 24792) 1439;Proc2: 3
Proc1x: 3
ProcB: 7
SELF.EVH;E.C1( 1325457) 2207;: 11
Each line in the value of variable _callChain (except the first
one) identifies the line in ESL script with CALL action.
For example a dump:
SELF.EVH;E.C3( 24791) 1438;Proc3: 8
represents the line 8 in script of the object of name E.C3.
Line 8 is in the context of procedure Proc3. Script was
performed on process SELF.EVH.
HOBJ of object E.C3 is 24791 and unique identifier of running script is 1438 (this
value is generated at each start of arbitrary script and it is univocal
within the process which interprets the scripts).
Mentioned line contains CALL Procx action calling the procedure Procx
within the script.
As the script was not changed, the previous line (in the value
of variable
_callChain) contains only procedure name and number of row.
This way allows to find out following information from value of
variable _callChain (described bottom up):
The action executing starts in script E.C1 (on the process SELF.EVH),
there is the procedure call ProcB on the line 11, there is
procedure call Proc1x on the line 7 and there is RPC procedure
call
Proc2 on the line 3 in the script E.C2 within the same
process of SELF.EVH. In the procedure (Proc2) there is RPC
procedure call Proc3 on the line 3 in the script E.C3
within the same process SELF.EVH.
There is procedure call Procx on the line 8 in the script E.C3 and
call of function
GetCallChain was performed on the line 4. |