gusucode.com > bigdata 工具箱 matlab源码程序 > bigdata/@tall/invokeErroringElementwise.m
function varargout = invokeErroringElementwise(fcnInfo, varargin) %INVOKEERRORINGELEMENTWISE Invokes elementwise function that can throw runtime errors % Copyright 2015-2016 The MathWorks, Inc. % This prevents this frame and anything below it being added to the gather % error stack. stack = createInvokeStack(fcnInfo{1}); markerFrame = matlab.bigdata.internal.InternalStackFrame(stack); %#ok<NASGU> try args = invokeInputCheck(fcnInfo, varargin{:}); fcn = str2func(fcnInfo{1}); fcn = matlab.bigdata.internal.FunctionHandle(fcn, 'ErrorFree', false); [varargout{1:max(1, nargout)}] = elementfun(fcn, args{:}); varargout = cellfun(@(out) invokeOutputInfo(fcnInfo{2}, out, args), varargout, 'UniformOutput', false); % Now try to propagate sizes varargout = computeElementwiseSize(varargout, args); catch E matlab.bigdata.BigDataException.hThrowAsCallerWithSubmissionStack(E, stack(1)); end end