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 position is known, Line and Column locate it in the layout source
(one-based, counted over the text handed to CStruct, prelude included). The
Message of a declaration error ends with (line L, column C); a syntax error from the parser
states the same position inside its sentence (unexpected ';' at line L, column C; expected ...).
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; }