Constructs a new VivRoleCastingError.
A human-readable summary of the failure.
Definition for the construct being targeted when the error occurred.
Name of the role involved in the failure.
OptionalextraContext: Record<string, unknown>If applicable, an object containing additional context about the failure.
ReadonlyconstructThe name of the construct being targeted when the error occurred.
ReadonlyconstructThe type of construct being targeted when the error occurred.
ReadonlynameThe name for a VivRoleCastingError.
ReadonlyroleThe name of the role that was being cast when the failure occurred.
Optional ReadonlyextraIf applicable, an object containing additional context, such as the evaluations of certain fields or intermediate concerns.
The key names used here will be descriptive.
A custom inspect handler that produces a human-readable summary of the error.
This handler will be invoked when the error is displayed in Node via console.log,
console.error, util.inspect, or its uncaught-exception output.
Note: This method only controls the display format. The structured properties will remain available for programmatic access.
The current recursion depth in the Node inspect call.
The Node inspect options (used to determine whether colors are enabled).
A formatted string summarizing the error.
Returns a formatted human-readable summary of the error.
Error thrown while performing role casting for a given construct.
These errors occur due to authoring issues in the compiled content bundle that cannot be detected at compilation time, because they depend on the live simulation state. Examples include malformed precast bindings, bad casting pools, or candidates that violate role constraints.