//===============================================================================
// Jaxlab Rules Engine - A library for utilizing Rules in .Net
// Copyright (C) 2005 Jeff Bramlett - www.jaxlab.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//================================================================================
using System;
namespace Jaxlab.Rules
{
/// <summary>
/// Exception class used when an Inference is being added but the Inference
/// already exists.
/// </summary>
public class DuplicateInferenceException: System.Exception
{
#region Instance Data members
/// <summary>
/// The id of the variable
/// </summary>
string m_sVariableID = "";
#endregion
#region Ctors
/// <summary>
/// Parameterless constructor
/// </summary>
public DuplicateInferenceException()
{
}
/// <summary>
/// Default constructor
/// </summary>
/// <param name="sVarId"></param>
public DuplicateInferenceException(string sVarId)
{
m_sVariableID = sVarId;
}
#endregion
#region Overrides
/// <summary>
/// Override of Exception Message
/// </summary>
public override string Message
{
get
{
if(m_sVariableID == "")
{
return "Duplicate Variable ID for Inference";
}
else
{
return "Duplicate Variable ID " + m_sVariableID + " for Inference";
}
}
}
#endregion
}
}