Skip Error Message and Continue with the M-File
Mostrar comentarios más antiguos
Hello dear Friends,
does someone know how to have a m-file to continue after an error message is returned !?
I've a file that retrives info from the internet (data, etc.). Sometimes (randomly) an internet connection problem results (error 111) and matlab stops to execute the m-file algo! Since this files connects to more than 5000 web pages (one per time) it is possible that a connection error is returned in matlab.
I simply want the program to resume the operations specified in the m-file.
does someone know how to do this?
thank you for your help ...
4 comentarios
Javier Munoz
el 12 de Mayo de 2017
Hello,
I need to block popup windows and continue execution. I tried with isdeployed but it does not work. Even with try-catch and neither.
Can you help me?
Thank you
Walter Roberson
el 12 de Mayo de 2017
Javier Munoz: what function is bringing up the popup windows? For example, turning off msgbox() in code you control would have a different solution than blocking pop-ups inside a web browsing context.
Javier Munoz
el 15 de Mayo de 2017
I need to omit an error that appear in a "msgbox"Walter,
Walter Roberson
el 15 de Mayo de 2017
Create your own function msgbox and place it earlier in the path than MATLAB's version:
function fig = msgbox(varargin)
if nargout > 0
fig = gobjects(0);
end
Note: the above is valid for R2014b and later only.
This will likely interfere with messages that you want kept. so a much better strategy would be to either comment out the calls you do not want or else put them inside an "if" condition that allows you to choose whether to display them or not.
Respuesta aceptada
Más respuestas (2)
Gerd
el 17 de Jun. de 2011
Hi,
just use the try command on the weboperation.
try
%commands to be executed
end
If you do have a problem between the try block you still can continue in your m-file
Gerd
Ahmadreza Eslami
el 27 de Abr. de 2022
The code that you are going to execute has an erronous line(s). In case of error, part under try will stop due to the error but the catch part will continue which the second part of your code after error.
% Your code part one
try
% your code
% Error
catch
% Your code part two
end
1 comentario
Walter Roberson
el 27 de Abr. de 2022
Categorías
Más información sobre Java Package Integration en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!