Menu

#27 Clean-up actions directly after/before calling Mat_Critical/Mat_Error

1.5.6
closed-fixed
tbeu
None
5
2016-07-07
2014-06-04
tbeu
No

The adapted matio for the Modelica environment (see https://trac.modelica.org/Modelica/browser/Modelica/trunk/Modelica/Resources/C-Sources/ModelicaMatIO.c) calls ModelicaFormatError in Mat_Critical (and Mat_Error). By design ModelicaFormatError never returns to the calling function (using setjmp/longjmp exception handling). This is bad for matio where some clean-up (closing file handles, freeing variables etc) is done immediately after Mat_Critical/Mat_Error. For that reason I propose to do the necessary clean-up directly before calling Mat_Critical/Mat_Error.

Discussion

  • cch

    cch - 2014-06-20

    I'm ok with doing this so long as information from cleaned up variables isn't used in the error message. This seems like it will be tedious to go through and make these changes. Make take a little while.

     
  • tbeu

    tbeu - 2014-06-23

    Only a view number of changes were relevant. See proposed patch.

     
  • tbeu

    tbeu - 2014-08-04

    Chris, did you have some spare minutes to check the proposed patch?

     
  • tbeu

    tbeu - 2016-01-31
    • status: open --> closed-fixed
    • assigned_to: tbeu
     
  • tbeu

    tbeu - 2016-07-07
    • Group: master --> 1.5.6
     

Log in to post a comment.