In DXL, lasterror() is not working
Hello, I have a query or problem with the DXL script in latest version 9728
Following is the problem noError() & lastError() used to suppress the error and to stop the immediate halt. In the new version may be it suppressed but still the suppressed error is lost.
Below is not a custom code – It is a two liner how to read a module (just a basic example
Code1: [Positive case] noError() // this works like a try
print "before load module" "\n"
string moduleFullName = "/Training_HandsOn/mmd1kor/MO_Template" Module mod = read(moduleFullName)
print "after load module" "\n"
string lastErr=lastError() // this works like a catch if(!null lastErr){ print "Error" "\n" print lastErr }else{ print "No Error" }
Output: before load module after load module No Error
-----
Code2: [Failure case: expectation code prints the Error but it is not happening ] noError() // this works like a try
print "before load module" "\n"
string moduleFullName //i didnot provide value i declared null Module mod = read(moduleFullName)
print "after load module" "\n"
string lastErr=lastError() // this works like a catch if(!null lastErr){ print "Error" "\n" print lastErr }else{ print "No Error" }
Output: before load module
Anyone help me? Thanks in advance. |
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.