function error(varargin)
%MATLAB Code Generation Library Function

%   Limitations:  This is an extrinsic call.  

%   Copyright 1984-2015 The MathWorks, Inc.
%#codegen

eml_allow_mx_inputs;
coder.extrinsic('error');
eml_invariant(nargin > 0, ...
    'MATLAB:minrhs');
if eml_is_const(isempty(varargin{1})) && ~isempty(varargin{1})
    coder.internal.is_noreturn;
end
INMATLAB = coder.internal.runs_in_matlab;
ISERROR = ~isempty(varargin{1});
if INMATLAB && ~coder.internal.get_eml_option('MXArrayCodeGen')
    if ISERROR
        coder.internal.error('EMLRT:runTime:RunTimeErrorOccurredNoExtrinsic');
    end
elseif ~INMATLAB && coder.internal.get_eml_option('IntegrityChecks')
    if ISERROR
        coder.internal.error('EMLRT:runTime:RunTimeErrorOccurredStandalone');
    end
else
    error(varargin{:});
end
