Main .m file contains sub .m files and if one crashes, I want it to move to the next .m and carry on.

1 view (last 30 days)
Hi, I used this logic below to create a main.m file with several sub .m files like a,b,c,d,e (in the link)
However, if c has an error, I want it to not just stop but rather display error and keep moving on until it reaches the last sub .m file.
Any way to do this?

Accepted Answer

Sindar
Sindar on 6 Mar 2020
try
a
catch
warning('Problem using script ''a''');
end
try
b
catch
warning('Problem using script ''b''');
end
...

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!