gusucode.com > bigdata 工具箱 matlab源码程序 > bigdata/+matlab/+bigdata/+internal/+lazyeval/parseExecutionError.m

    function err = parseExecutionError(err)
%PARSEEXECUTIONERROR Parses an error from the lazy evaluation framework and removes internal frames.
%
%   err = parseExecutionError(err) Parses an error from the lazy evaluation
%   framework and removes internal frames.
%

%   Copyright 2015-2016 The MathWorks, Inc.

if isequal(err.identifier, 'MATLAB:bigdata:array:FunctionHandleError')
    err = err.cause{1};
elseif strncmp(err.identifier, 'MATLAB:bigdata:array', numel('MATLAB:bigdata:array'))
    % Errors from this catalog are assumed not to be internal.
elseif isequal(err.identifier, 'MATLAB:bigdata:spark:InternalError')
    % This error already indicates its status as internal. We don't need to
    % wrap it a second time.
elseif isequal(err.identifier, 'parallel:mapreduce:HadoopSparkEvaluationFailure')
    % This error is not internal.
else
    err = addCause(MException(message('MATLAB:bigdata:array:ExecutionError', err.message)), err);
end