Bytecode: release the lock on dynamic.bin when an exception occurs

Closes: #1815
pac-components
Sébastien Villemot 2021-09-20 17:28:43 +02:00
parent 82d0b1caf4
commit 271d80abee
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 0 deletions

View File

@ -723,6 +723,8 @@ mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
}
catch (GeneralExceptionHandling &feh)
{
// Release the lock on dynamic.bin for MATLAB+Windows, see #1815
interprete.Close_SaveCode();
mexErrMsgTxt(feh.GetErrorMsg().c_str());
}
}
@ -734,6 +736,8 @@ mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
}
catch (GeneralExceptionHandling &feh)
{
// Release the lock on dynamic.bin for MATLAB+Windows, see #1815
interprete.Close_SaveCode();
mexErrMsgTxt(feh.GetErrorMsg().c_str());
}
}