summaryrefslogtreecommitdiff
path: root/Noddybox.WindowsPhone.FTP/NetException.cs
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2012-10-01 20:59:12 +0000
committerIan C <ianc@noddybox.co.uk>2012-10-01 20:59:12 +0000
commite078a2887cf2dc61da49ce302324ff1485f95af9 (patch)
tree800c783a47576f7950497e5c8b7194ea439ae57a /Noddybox.WindowsPhone.FTP/NetException.cs
parentb228a31e12d8f30ed1f4bf03136cad3c41b1de45 (diff)
Added non-working code for an attempt at FTPHEADmaster
Diffstat (limited to 'Noddybox.WindowsPhone.FTP/NetException.cs')
-rw-r--r--Noddybox.WindowsPhone.FTP/NetException.cs84
1 files changed, 84 insertions, 0 deletions
diff --git a/Noddybox.WindowsPhone.FTP/NetException.cs b/Noddybox.WindowsPhone.FTP/NetException.cs
new file mode 100644
index 0000000..119c241
--- /dev/null
+++ b/Noddybox.WindowsPhone.FTP/NetException.cs
@@ -0,0 +1,84 @@
+// This file is part of the Noddybox.WindowsPhone C# suite.
+//
+// Noddybox.Emulation is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Noddybox.Emulation 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 Noddybox.Emulation. If not, see <http://www.gnu.org/licenses/>.
+//
+// Copyright (c) 2012 Ian Cowburn
+//
+using System;
+
+namespace Noddybox.WindowsPhone.Net
+{
+ /// <summary>
+ /// Exception raised for internal problems.
+ /// </summary>
+ public class NetException : System.Exception
+ {
+ /// <summary>
+ /// The types of error that can be raised
+ /// </summary>
+ public enum Type
+ {
+ /// <summary>
+ /// A server replied with no code in the first reply line
+ /// </summary>
+ ALL_NoReplyCode,
+
+ /// <summary>
+ /// The local IP address could not be found (note that all
+ /// the routines use the first available IP when onew must
+ /// be chosen).
+ /// </summary>
+ ALL_NoLocalIP,
+
+ /// <summary>
+ /// An uncompleted feature was used
+ /// </summary>
+ ALL_NotImplemented,
+
+ /// <summary>
+ /// The FTP server does not support passive connections
+ /// </summary>
+ FTP_NoPassive,
+
+ /// <summary>
+ /// The FTP server had a problem accepting our local port
+ /// info
+ /// </summary>
+ FTP_NonPassiveProblem,
+
+ /// <summary>
+ /// Given a bad address by the server
+ /// </summary>
+ FTP_BadReplyAddress
+ };
+
+ /// <summary>
+ /// Default constructor - initializes all fields to default values
+ /// </summary>
+ public NetException(Type e)
+ {
+ m_code=e;
+ }
+
+ /// <summary>
+ /// Gets the cause of the error
+ /// </summary>
+ public Type Error
+ {
+ get {return m_code;}
+ }
+
+ private Type m_code;
+ }
+}