Class PstFormatException
The exception that is thrown when a PST file is structurally corrupt to the point that reading cannot continue (e.g. the header cannot be parsed, or the format version is unrecognised).
Inherited Members
Namespace: DRIT.Mail.Pst.Validation
Assembly: DRIT.Mail.dll
Syntax
public class PstFormatException : Exception, ISerializable, _Exception
Remarks
This exception derives from Exception. Most read-path corruption should be collected as a ValidationIssue rather than thrown. PstFormatException is reserved for situations where there is no safe default to return and continuing would be meaningless.
Constructors
View SourcePstFormatException(ValidationIssue)
Initializes a new instance of PstFormatException from a ValidationIssue.
Declaration
public PstFormatException(ValidationIssue issue)
Parameters
| Type | Name | Description |
|---|---|---|
| ValidationIssue | issue | The validation issue that triggered this exception. |
Remarks
This exception derives from Exception. Most read-path corruption should be collected as a ValidationIssue rather than thrown. PstFormatException is reserved for situations where there is no safe default to return and continuing would be meaningless.
PstFormatException(string)
Initializes a new instance of PstFormatException with a specified error message.
Declaration
public PstFormatException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The message that describes the error. |
Remarks
This exception derives from Exception. Most read-path corruption should be collected as a ValidationIssue rather than thrown. PstFormatException is reserved for situations where there is no safe default to return and continuing would be meaningless.
PstFormatException(string, Exception)
Initializes a new instance of PstFormatException with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public PstFormatException(string message, Exception innerException)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | The error message that explains the reason for the exception. |
| Exception | innerException | The exception that is the cause of the current exception. |
Remarks
This exception derives from Exception. Most read-path corruption should be collected as a ValidationIssue rather than thrown. PstFormatException is reserved for situations where there is no safe default to return and continuing would be meaningless.
Properties
View SourceIssue
The validation issue that triggered this exception, if available.
Declaration
public ValidationIssue Issue { get; }
Property Value
| Type | Description |
|---|---|
| ValidationIssue |
Remarks
This exception derives from Exception. Most read-path corruption should be collected as a ValidationIssue rather than thrown. PstFormatException is reserved for situations where there is no safe default to return and continuing would be meaningless.