Sometimes I loose a toolbox license while running a MATLAB simulation taking several hours. The simulation then stops, I get an error message like:
- License checkout failed
- License Manager Error -5
- Cannot find a license for Communication_Toolbox.
but there is no red error-text you normally get when there's an error in the MATLAB code itself.
Since this license error is not reproducable easily, does anybody know if it is an exception that can be caught within a try/catch? I could then maybe catch it, check the error-message for the word 'license' and keep trying until I get a license again and continue.
Edit: what apparently happens is that every couple of hours the flexlm license server is reset, if someone else then grabs a license before my already running script does, then my scrip is aborted. Or maybe my script tries to check the license while the license server is restarting...