Class PortrayalAssetNotFoundException
Thrown when a portrayal catalogue is asked for a named asset — an SVG symbol, line style, area fill, or portrayal rule — that the loaded catalogue does not contain.
public sealed class PortrayalAssetNotFoundException : Exception, ISerializable
- Inheritance
-
PortrayalAssetNotFoundException
- Implements
- Inherited Members
Remarks
A miss here is a contract violation, not an expected absence: a drawing
instruction or rule referenced an asset the packaged catalogue should have
carried, so there is no meaningful recovery at the lookup site and the
method fails fast (see the missing-value policy in
docs/design/api-conventions.md). It derives from
Exception — the recommended base for a domain exception —
rather than KeyNotFoundException, so it is not swept up by
handlers that guard ordinary dictionary lookups.
Callers that must tolerate a missing asset (for example the render-time catalogue pre-warm, which treats any lookup failure as "not in catalogue") should catch this explicitly.
Constructors
PortrayalAssetNotFoundException(PortrayalAssetKind, string, Exception?)
Initializes a new PortrayalAssetNotFoundException for the given asset kind and name.
public PortrayalAssetNotFoundException(PortrayalAssetKind assetKind, string assetName, Exception? innerException = null)
Parameters
assetKindPortrayalAssetKindThe category of the missing asset.
assetNamestringThe catalogue name that was not found.
innerExceptionExceptionThe optional underlying cause.
Properties
AssetKind
The category of asset that was requested.
public PortrayalAssetKind AssetKind { get; }
Property Value
AssetName
The catalogue name that was looked up and not found.
public string AssetName { get; }