view m-toolbox/classes/tests/@Assert/fail.m @ 5:5a49956df427 database-connection-manager

LTPDAPreferences panel for new LTPDADatabaseConnectionManager
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Mon, 05 Dec 2011 16:20:06 +0100
parents f0afece42f48
children
line wrap: on
line source

% FAIL throws an AssertionFailed exception with the given message.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: FAIL throws an AssertionFailed exception with the given message.
%
% COMMAND:     Assert.fail(message)
%
% VERSION:     $Id: fail.m,v 1.1 2011/06/20 16:32:56 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function fail(varargin)
  
  if isempty(varargin)
    ex = AssertionFailed(Assert.errMsgId, Assert.defaultErrMsg);
  else
    ex = AssertionFailed(Assert.errMsgId, varargin{:});
  end
  
  ex.throwAsCaller();
  
end