2
using System.Collections.Generic;
4
using System.Runtime.Serialization;
7
The contents of this file are subject to the Mozilla Public License
8
Version 1.1 (the "License"); you may not use this file except in
9
compliance with the License. You may obtain a copy of the License at
10
http://www.mozilla.org/MPL/
12
Software distributed under the License is distributed on an "AS IS"
13
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
14
License for the specific language governing rights and limitations
17
The Original Code is OpenMCDF - Compound Document Format library.
19
The Initial Developer of the Original Code is Federico Blaseotto.
25
/// OpenMCDF base exception.
28
public class CFException : Exception
35
protected CFException(SerializationInfo info, StreamingContext context)
40
public CFException(string message)
46
public CFException(string message, Exception innerException)
47
: base(message, innerException)
55
/// Raised when a data setter/getter method is invoked
56
/// on a stream or storage object after the disposal of the owner
57
/// compound file object.
60
public class CFDisposedException : CFException
62
public CFDisposedException()
67
protected CFDisposedException(SerializationInfo info, StreamingContext context)
72
public CFDisposedException(string message)
78
public CFDisposedException(string message, Exception innerException)
79
: base(message, innerException)
87
/// Raised when opening a file with invalid header
88
/// or not supported COM/OLE Structured storage version.
91
public class CFFileFormatException : CFException
93
public CFFileFormatException()
98
protected CFFileFormatException(SerializationInfo info, StreamingContext context)
103
public CFFileFormatException(string message)
104
: base(message, null)
109
public CFFileFormatException(string message, Exception innerException)
110
: base(message, innerException)
118
/// Raised when a named stream or a storage object
119
/// are not found in a parent storage.
122
public class CFItemNotFound : CFException
124
protected CFItemNotFound(SerializationInfo info, StreamingContext context)
125
: base(info, context)
129
public CFItemNotFound()
130
: base("Entry not found")
134
public CFItemNotFound(string message)
135
: base(message, null)
140
public CFItemNotFound(string message, Exception innerException)
141
: base(message, innerException)
149
/// Raised when a method call is invalid for the current object state
152
public class CFInvalidOperation : CFException
154
public CFInvalidOperation()
159
protected CFInvalidOperation(SerializationInfo info, StreamingContext context)
160
: base(info, context)
164
public CFInvalidOperation(string message)
165
: base(message, null)
170
public CFInvalidOperation(string message, Exception innerException)
171
: base(message, innerException)
179
/// Raised when trying to add a duplicated CFItem
182
/// Items are compared by name as indicated by specs.
183
/// Two items with the same name CANNOT be added within
184
/// the same storage or sub-storage.
187
public class CFDuplicatedItemException : CFException
189
public CFDuplicatedItemException()
194
protected CFDuplicatedItemException(SerializationInfo info, StreamingContext context)
195
: base(info, context)
199
public CFDuplicatedItemException(string message)
200
: base(message, null)
205
public CFDuplicatedItemException(string message, Exception innerException)
206
: base(message, innerException)