function error(code,list,varargin)
% error  FAVAR class errors.
%
% Backend IRIS function.
% No help provided.

% -IRIS Toolbox.
% -Copyright (c) 2007-2012 Jaromir Benes.

%**************************************************************************

switch code
   case 1
      msg = 'No observations available to estimate FAVAR.';
   case 2
      msg = 'Data covariance matrix contains Infs of NaNs.';
   case 5
      msg = 'Invalid input data.';
   case 6
      msg = 'This is not a valid FAVAR object query: ''%s''.';
end

if nargin == 1
   list = {};
end
if ~iscell(list)
   list = {list};
end
printmsg('VAR','error',msg,list,code);

end
