Class MalformedCsvException
Represents the exception that is thrown when a CSV file is malformed.
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
System.Exception.GetBaseException()
System.Exception.GetType()
System.Exception.ToString()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Source
System.Exception.StackTrace
System.Exception.TargetSite
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Common.IO.Exceptions
Assembly: Mars.IO.dll
Syntax
[Serializable]
public class MalformedCsvException : Exception, ISerializable
Constructors
| Improve this Doc View SourceMalformedCsvException()
Initializes a new instance of the MalformedCsvException class.
Declaration
public MalformedCsvException()
MalformedCsvException(SerializationInfo, StreamingContext)
Initializes a new instance of the MalformedCsvException class with serialized data.
Declaration
protected MalformedCsvException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
System.Runtime.Serialization.StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
MalformedCsvException(String, Exception)
Initializes a new instance of the MalformedCsvException class.
Declaration
public MalformedCsvException(string message, Exception innerException = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message that describes the error. |
System.Exception | innerException | The exception that is the cause of the current exception. |
MalformedCsvException(String, Int32, Int64, Int32, Exception)
Initializes a new instance of the MalformedCsvException class.
Declaration
public MalformedCsvException(string rawData, int currentPosition, long currentRecordIndex, int currentFieldIndex, Exception innerException = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | rawData | The raw data when the error occured. |
System.Int32 | currentPosition | The current position in the raw data. |
System.Int64 | currentRecordIndex | The current record index. |
System.Int32 | currentFieldIndex | The current field index. |
System.Exception | innerException | The exception that is the cause of the current exception. |
Properties
| Improve this Doc View SourceCurrentFieldIndex
Gets the current field index.
Declaration
public int CurrentFieldIndex { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The current record index. |
CurrentPosition
Gets the current position in the raw data.
Declaration
public int CurrentPosition { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The current position in the raw data. |
CurrentRecordIndex
Gets the current record index.
Declaration
public long CurrentRecordIndex { get; }
Property Value
Type | Description |
---|---|
System.Int64 | The current record index. |
Message
Gets a message that describes the current exception.
Declaration
public override string Message { get; }
Property Value
Type | Description |
---|---|
System.String | A message that describes the current exception. |
Overrides
System.Exception.Message
|
Improve this Doc
View Source
RawData
Gets the raw data when the error occurred.
Declaration
public string RawData { get; }
Property Value
Type | Description |
---|---|
System.String | The raw data when the error occurred. |
Methods
| Improve this Doc View SourceGetObjectData(SerializationInfo, StreamingContext)
When overridden in a derived class, sets the SerializationInfo with information about the
exception.
Declaration
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The SerializationInfo that holds the serialized object data about the exception being thrown. |
System.Runtime.Serialization.StreamingContext | context | The StreamingContext that contains contextual information about the source or destination. |
Overrides
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
Implements
System.Runtime.Serialization.ISerializable