herculanojs Posted June 3, 2018 Share 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 Link to comment Share on other sites More sharing options...
herculanojs Posted June 3, 2018 Author Share Posted June 3, 2018 Sample example project I need a solution for that. Project1.zip Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 3, 2018 Administrators Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted June 3, 2018 Administrators Share Posted June 3, 2018 [UNG-2494] - Avoid synchronous modals inside an exception block. ... Quote Link to comment Share on other sites More sharing options...
herculanojs Posted June 3, 2018 Author Share Posted June 3, 2018 ok, tanks Quote Link to comment Share on other sites More sharing options...
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.