[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Add C# controller lib port from Oliver Rau.
Update of /home/or/cvsroot/control/cs/control/Exceptions
In directory moria:/tmp/cvs-serv5623/control/Exceptions
Added Files:
TorControlException.cs TorControlSyntaxException.cs
Log Message:
Add C# controller lib port from Oliver Rau.
--- NEW FILE: TorControlException.cs ---
/*
* File TorControlException.cs
*
* Copyright (C) 2005 Oliver Rau (olra0001@xxxxxxxxxxxxxxxxxxx)
*
* See LICENSE file for copying information
*
* Created on 08.08.2005 20:37
*
* $Id: TorControlException.cs,v 1.1 2005/11/09 21:47:04 nickm Exp $
*/
using System;
namespace Tor.Control
{
/// <summary>
/// Description of TorControlException.
/// </summary>
public class TorControlException : Exception
{
int errorType;
public TorControlException(int type, String s) : base(s)
{
errorType = type;
}
public TorControlException(string s) : this(-1, s)
{
}
public int ErrorType {
get { return errorType; }
}
public string ErrorMsg {
get {
try {
if (errorType == -1)
return null;
return TorControl.ErrorMsgs[errorType];
} catch (IndexOutOfRangeException ex) {
return "Unrecognized error #" + errorType;
}
}
}
}
}
--- NEW FILE: TorControlSyntaxException.cs ---
/*
* File TorControlSyntaxException.cs
*
* Copyright (C) 2005 Oliver Rau (olra0001@xxxxxxxxxxxxxxxxxxx)
*
* See LICENSE file for copying information
*
* Created on 08.08.2005 20:37
*
* $Id: TorControlSyntaxException.cs,v 1.1 2005/11/09 21:47:04 nickm Exp $
*/
using System;
namespace Tor.Control
{
/// <summary>
/// Description of TorControlSyntaxException.
/// </summary>
public class TorControlSyntaxException : Exception
{
public TorControlSyntaxException(string s) : base(s)
{}
}
}