Class CStructLayoutException
- Namespace
- CStructSharp.Diagnostics
- Assembly
- CStructSharp.dll
Represents a layout declaration that cannot be resolved into a safe, finite binary representation.
public sealed class CStructLayoutException : CStructException, ISerializable
- Inheritance
-
CStructLayoutException
- Implements
- Inherited Members
Remarks
When the failing declaration is known, Line and Column locate it in the layout
source (one-based, counted over the text handed to CStruct, prelude included) and the
Message ends with (line L, column C). A syntax error from the parser carries its position
in the message text itself and leaves these properties null.
Constructors
CStructLayoutException()
Creates an empty layout error.
public CStructLayoutException()
CStructLayoutException(string)
Creates a layout error with an actionable description of the invalid declaration.
public CStructLayoutException(string message)
Parameters
messagestringThe caller-facing diagnostic for the invalid declaration.
CStructLayoutException(string, Exception)
Creates a layout error with its message and the lower-level error that caused it.
public CStructLayoutException(string message, Exception innerException)
Parameters
messagestringThe caller-facing diagnostic for the invalid declaration.
innerExceptionExceptionThe lower-level parse, validation, or arithmetic failure.
Properties
Column
Gets the one-based source column of the failing declaration, when known.
public int? Column { get; }
Property Value
- int?
Line
Gets the one-based source line of the failing declaration, when known.
public int? Line { get; }
Property Value
- int?
Message
Gets the diagnostic with every known fact appended: the field and its type, the requested path, and the position at which the operation stopped, so a caller that only logs the message still sees where the failure happened.
public override string Message { get; }