// LumenWorks.Framework.IO.Csv.MissingFieldCsvException // Copyright (c) 2005 Sébastien Lorion // // MIT license (http://en.wikipedia.org/wiki/MIT_License) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE // FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. using System; using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; using LumenWorks.Framework.IO.Csv.Resources; namespace LumenWorks.Framework.IO.Csv { /// /// Represents the exception that is thrown when a there is a missing field in a record of the CSV file. /// /// /// MissingFieldException would have been a better name, but there is already a . /// [Serializable()] public class MissingFieldCsvException : MalformedCsvException { #region Constructors /// /// Initializes a new instance of the MissingFieldCsvException class. /// public MissingFieldCsvException() : base() { } /// /// Initializes a new instance of the MissingFieldCsvException class. /// /// The message that describes the error. public MissingFieldCsvException(string message) : base(message) { } /// /// Initializes a new instance of the MissingFieldCsvException class. /// /// The message that describes the error. /// The exception that is the cause of the current exception. public MissingFieldCsvException(string message, Exception innerException) : base(message, innerException) { } /// /// Initializes a new instance of the MissingFieldCsvException class. /// /// The raw data when the error occured. /// The current position in the raw data. /// The current record index. /// The current field index. public MissingFieldCsvException(string rawData, int currentPosition, long currentRecordIndex, int currentFieldIndex) : base(rawData, currentPosition, currentRecordIndex, currentFieldIndex) { } /// /// Initializes a new instance of the MissingFieldCsvException class. /// /// The raw data when the error occured. /// The current position in the raw data. /// The current record index. /// The current field index. /// The exception that is the cause of the current exception. public MissingFieldCsvException(string rawData, int currentPosition, long currentRecordIndex, int currentFieldIndex, Exception innerException) : base(rawData, currentPosition, currentRecordIndex, currentFieldIndex, innerException) { } /// /// Initializes a new instance of the MissingFieldCsvException class with serialized data. /// /// The that holds the serialized object data about the exception being thrown. /// The that contains contextual information about the source or destination. protected MissingFieldCsvException(SerializationInfo info, StreamingContext context) : base(info, context) { } #endregion } }