/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Runtime.Serialization;
namespace Lucene.Net.Store
{
// JAVA: src/java/org/apache/lucene/store/AlreadyClosedException.java
///
/// This exception is thrown when there is an attempt to access a resource
/// that has already been closed.
///
///
///
/// An example would be when a has already been closed.
///
///
[Serializable]
public class AlreadyClosedException : System.SystemException
{
///
/// Initializes a new instance of with a message and null inner exception.
///
///
/// A String that describes the error. The content of message is intended to be understood
/// by humans. The caller of this constructor is required to ensure that this string has been
/// localized for the current system culture.
///
///
///
/// The constructor initializes the property of the new instance using message.
///
///
public AlreadyClosedException(System.String message):base(message)
{
}
///
/// Initializes a new instance of with a message and inner exception.
///
///
/// A String that describes the error. The content of message is intended to be understood
/// by humans. The caller of this constructor is required to ensure that this string has been
/// localized for the current system culture.
///
///
/// The exception that is the cause of the current exception. If the parameter is not null, the
/// current exception is raised in a catch block that handles the inner exception.
///
///
///
/// An exception that is thrown as a direct result of a previous exception should include a reference to the
/// previous exception in the property. The property
/// returns the same value that is passed into the constructor, or null if
/// the property does not supply the inner
/// exception value to the constructor.
///
///
public AlreadyClosedException(string message, Exception innerException)
: base(message, innerException)
{
}
///
/// Initializes a new instance of the class with the specified serialization and context information.
///
/// The data for serializing or deserializing the object.
/// The source and destination for the object.
// REFACTOR: add build conditional to only compile in the client and full versions of the .NET framework.
protected AlreadyClosedException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}