
Hi all,
I have a try and catch statement. When an error appeared, the catch statement caught the error, without running the codes inside the catch block.
The code below tries to insert a record into PurchTable, only to have the system complainining an already existing PurchId in place.
Now, I am completely fine with having that error. I tried to handle that error with a catch statement beneath it, but it is not executing the code within the catch.
Could anyone please enlighten me?
Here is the code below:
try
{
purchTable.insert(); //An already existing purchId exists in the PurchTable
}
catch //code was read by the compiler/ AX when I was stepped into inside debugging mode
{
warning("Exception caught"); //code skipped because of "Unhandled exception: Multiple key blah blah.."
}
*This post is locked for comments
I have the same question (0)Okay, I just found out that this has something to do with my positioning of ttsbegin and ttscommit, and I've solved it out.
Could the mod please delete this thread, thanks in advance.