herculanojs Posted June 3, 2018 Posted June 3, 2018 Something strange is happening with version 1.10.0.1459, when there is an exception in nested procedures. The example below is pretty simple, but in complex routines this is causing problems. I did not encounter this problem until the upgrade to this version. Example: procedure test; begin try test2; except raise; end; end; procedure teste2; begin try test3; except on e: exception begin MessageDlg (e.Message, mtError, [mbOK]); end; end; end; procedure test3; begin try ... process except on e: exception begin MessageDlg (e.Message, mtError, [mbOK]); end; end; end; Quote
herculanojs Posted June 3, 2018 Author Posted June 3, 2018 Sample example project I need a solution for that. Project1.zip Quote
Administrators Farshad Mohajeri Posted June 3, 2018 Administrators Posted June 3, 2018 Blocking methods can not be called inside exception blocks. We added this restriction recently. It is done to avoid some unexpected side effects which may lead to application crash. If you only need to show a message then use non-blocking ShowMessageN() or MessageDlg() with a callback. ... ... Quote
Administrators Farshad Mohajeri Posted June 3, 2018 Administrators Posted June 3, 2018 [UNG-2494] - Avoid synchronous modals inside an exception block. ... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.