Exception: Fontisan::DeltaMismatchError

Inherits:
VariationError show all
Defined in:
lib/fontisan/error.rb

Overview

Delta count mismatch

Raised when delta arrays have mismatched lengths.

Instance Attribute Summary

Attributes inherited from VariationError

#context, #suggestion

Instance Method Summary collapse

Methods inherited from VariationError

#detailed_message

Constructor Details

#initialize(expected:, actual:, location:) ⇒ DeltaMismatchError

Initialize with delta details

Parameters:

  • expected (Integer)

    Expected delta count

  • actual (Integer)

    Actual delta count

  • location (String)

    Where mismatch occurred



141
142
143
144
145
146
147
# File 'lib/fontisan/error.rb', line 141

def initialize(expected:, actual:, location:)
  super(
    "Delta count mismatch at #{location}: expected #{expected}, got #{actual}",
    context: { expected: expected, actual: actual, location: location },
    suggestion: "Verify variation data integrity in #{location}"
  )
end