| 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 | |
|---|
| 22 | using System; |
|---|
| 23 | using System.Collections.Generic; |
|---|
| 24 | using System.Text; |
|---|
| 25 | using System.Runtime.Serialization; |
|---|
| 26 | using Eraser.Util; |
|---|
| 27 | |
|---|
| 28 | namespace 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 | } |
|---|