diff Exceptions/FileExistsException.cs @ 0:82db9430c2e4 default tip

Initial commit under GPLv3
author IBBoard <dev@ibboard.co.uk>
date Sat, 06 Oct 2018 19:49:25 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Exceptions/FileExistsException.cs	Sat Oct 06 19:49:25 2018 +0100
@@ -0,0 +1,29 @@
+// This file is a part of the Relic Tools and is copyright 2006-2018 IBBoard.
+//
+// The file and the library/program it is in are licensed under the GNU GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
+using System;
+
+namespace IBBoard.Relic.RelicTools.Exceptions
+{
+	/// <summary>
+	/// Summary description for FileExistsException.
+	/// </summary>
+	public class FileExistsException:Exception
+	{
+		private static readonly string DefaultMessage = "The file to be extracted already existed at the specified location and \"no overwrite\" was specified.";
+		private static readonly string DefaultMessageStart = "The file to be extracted (";
+		private static readonly string DefaultMessageEnd = ") already existed at the specified location and \"no overwrite\" was specified.";
+
+		public FileExistsException():base(DefaultMessage)
+		{
+		}
+
+		public FileExistsException(Exception ex):base(DefaultMessage, ex)
+		{
+		}
+
+		public FileExistsException(string filename):base(DefaultMessageStart+filename+DefaultMessageEnd)
+		{
+		}
+	}
+}