CASA/c_micasad/common/CSSSException.cs
2006-01-18 23:34:21 +00:00

104 lines
2.8 KiB
C#

/***********************************************************************
*
* Copyright (C) 2005-2006 Novell, Inc.
*
* 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; version 2.1
* of the License.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* To contact Novell about this file by physical or electronic mail,
* you may find current contact information at www.novell.com.
*
***********************************************************************/
using System;
using System.IO;
namespace sscs.common
{
//TBD
// All user defined exceptions will extend this class in future
internal class CSSSException : ApplicationException
{
internal string user;
internal CSSSException (string message)
{
}
}
internal class CommunicationException : ApplicationException
{
internal CommunicationException (String message) : base (message)
{
}
internal CommunicationException (String message, Exception inner) : base(message,inner)
{
}
}
internal class MessageFormatException : Exception
{
internal MessageFormatException (String message) : base (message)
{
}
internal MessageFormatException (String message, Exception inner) : base(message,inner)
{
}
}
internal class UserNotInSessionException : Exception
{
internal UserNotInSessionException (String message) : base (message)
{
CSSSLogger.DbgLog(message);
}
internal UserNotInSessionException (UserIdentifier user)
{
CSSSLogger.DbgLog("UserIdentifier is not in session table " + user.GetUID());
}
}
internal class KeyChainDoesNotExistException : Exception
{
internal KeyChainDoesNotExistException (String kId)
{
CSSSLogger.DbgLog("Keychain - " + kId + " not found");
}
}
internal class SecretNotFoundException : Exception
{
internal SecretNotFoundException (String sId)
{
CSSSLogger.DbgLog("SecretId - " + sId + " not found");
}
}
internal class CryptoException : ApplicationException
{
internal CryptoException(string msg)
{
CSSSLogger.DbgLog("Crypto exception : " + msg );
}
}
}