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 ); } } }