Is it possible to capture partial output in the case of an error during evalc?
5 次查看(过去 30 天)
显示 更早的评论
Looking to see if it is possible to capture partial output from evalc if it never returns. Consider:
try
str = evalc('disp(''HERE''); error(''something bad happened''); disp(''NOW HERE'')');
catch ME
end
In the catch block, the variable "str" is not defined because evalc never returned. However, just before the error, we would've seen "HERE" displayed using plain "eval". Is there any way to get that information in the catch block with evalc?
2 个评论
Oleg Komarov
2012-1-16
What do you need this functionality for? If you try to describe the general problem you want to solve we might come up with an alternative (and easier to debug, interpret, read) solution.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Performance and Memory 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!