Proper error handling of mds-related errors
It is proposed to use mds
status flag passed through tdi
to check for errors, instead of tests of the returned data directly.
For example replacing
d = tdi('expression')
if ~ischar(d.data) && ~isempty(d.data)
% use data
else
warning('problem')
end
with
[d] = tdi('expression')
if ~rem(d.status,2) % unambigious way to check for problems
warning('problem')
end
Previous discussion:
-
@vallar started a discussion: (+10 comments)
Edited by Federico Felici