MatrixBerryCore
throwerror.m
Go to the documentation of this file.
1 function meObj=throwerror(msgTag,varargin)
2 import mxberry.core.getcallername;
3 import mxberry.core.parseparext;
4 [reg,~,nCallerStackStepsUp]=parseparext(varargin,...
5  {'nCallerStackStepsUp';1},'propRetMode','separate');
6 callerName=getcallername(1+nCallerStackStepsUp,'full');
7 callerName=strrep(callerName,'.',':');
8 
9 meObj=MException([upper(callerName),':',msgTag],reg{:});
10 if nargout==0
11  throwAsCaller(meObj);
12 end
function throwerror(in msgTag, in varargin)
THROWERROR works similarly to built-in ERROR function in case when there is no output arguments but s...
function parseparext(in args, in propNameValMat, in varargin)
PARSEPAREXT behaves in the same way as mxberry.core.parseparams but returns property values in a more...
function getcallername(in nStepsUp, in mode)
GETCALLERNAME returns a name of caller determined by a number of steps up in the call stacks...