source: trunk/eraser6/Eraser.Manager/Exception.cs @ 1675

Revision 1675, 3.5 KB checked in by lowjoel, 5 years ago (diff)

Updated copyright information: since Eraser is still under development we should update our copyright status.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1/*
2 * $Id$
3 * Copyright 2008-2010 The Eraser Project
4 * Original Author: Joel Low <lowjoel@users.sourceforge.net>
5 * Modified By:
6 *
7 * This file is part of Eraser.
8 *
9 * Eraser is free software: you can redistribute it and/or modify it under the
10 * terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option) any later
12 * version.
13 *
14 * Eraser is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 *
18 * A copy of the GNU General Public License can be found at
19 * <http://www.gnu.org/licenses/>.
20 */
21
22using System;
23using System.Collections.Generic;
24using System.Text;
25using System.Runtime.Serialization;
26using Eraser.Util;
27
28namespace Eraser.Manager
29{
30    /// <summary>
31    /// Fatal exception class.
32    /// </summary>
33    [Serializable]
34    public class FatalException : Exception
35    {
36        public FatalException()
37        {
38        }
39
40        public FatalException(string message)
41            : base(message)
42        {
43        }
44
45        protected FatalException(SerializationInfo info, StreamingContext context)
46            : base(info, context)
47        {
48        }
49
50        public FatalException(string message, Exception innerException)
51            : base(message, innerException)
52        {
53        }
54    }
55
56    [Serializable]
57    public class EntropySourceNotFoundException : FatalException
58    {
59        public EntropySourceNotFoundException()
60        {
61        }
62
63        public EntropySourceNotFoundException(string message)
64            : base(message)
65        {
66        }
67
68        public EntropySourceNotFoundException(Guid value)
69            : this(S._("EntropySource GUID not found: {0}", value.ToString()))
70        {
71        }
72
73        protected EntropySourceNotFoundException(SerializationInfo info, StreamingContext context)
74            : base(info, context)
75        {
76        }
77
78        public EntropySourceNotFoundException(Guid value, Exception innerException)
79            : this(S._("EntropySource GUID not found: {0}", value.ToString()),
80                innerException)
81        {
82        }
83
84        public EntropySourceNotFoundException(string message, Exception innerException)
85            : base(message, innerException)
86        {
87        }
88    }
89
90    [Serializable]
91    public class ErasureMethodNotFoundException : FatalException
92    {
93        public ErasureMethodNotFoundException()
94        {
95        }
96
97        public ErasureMethodNotFoundException(string message)
98            : base(message)
99        {
100        }
101       
102        public ErasureMethodNotFoundException(Guid value)
103            : this(S._("Erasure method not found: {0}", value.ToString()))
104        {
105        }
106
107        protected ErasureMethodNotFoundException(SerializationInfo info, StreamingContext context)
108            : base(info, context)
109        {
110        }
111
112        public ErasureMethodNotFoundException(Guid value, Exception innerException)
113            : this(S._("Erasure method not found: {0}", value.ToString()),
114                innerException)
115        {
116        }
117
118        public ErasureMethodNotFoundException(string message, Exception innerException)
119            : base(message, innerException)
120        {
121        }
122    }
123
124    [Serializable]
125    public class PrngNotFoundException : FatalException
126    {
127        public PrngNotFoundException()
128        {
129        }
130
131        public PrngNotFoundException(string message)
132            : base(message)
133        {
134        }
135       
136        public PrngNotFoundException(Guid value)
137            : this(S._("PRNG not found: {0}", value.ToString()))
138        {
139        }
140
141        protected PrngNotFoundException(SerializationInfo info, StreamingContext context)
142            : base(info, context)
143        {
144        }
145
146        public PrngNotFoundException(Guid value, Exception innerException)
147            : this(S._("PRNG not found: {0}", value.ToString()),
148                innerException)
149        {
150        }
151
152        public PrngNotFoundException(string message, Exception innerException)
153            : base(message, innerException)
154        {
155        }
156    }
157}
Note: See TracBrowser for help on using the repository browser.