class
Termisu::ParseError
- Termisu::ParseError
- Termisu::Error
- Exception
- Reference
- Object
Overview
Error raised when parsing terminfo binary data fails.
Provides specific error types to distinguish between different failure modes:
- Invalid magic number (unsupported format)
- Truncated data (file too small)
- Invalid header values
- Corrupted string table
Defined in:
termisu/error.crConstructors
-
.invalid_header(field : String, value : Int16) : ParseError
Creates an InvalidHeader error.
-
.invalid_magic(actual : Int16) : ParseError
Creates an InvalidMagic error.
-
.invalid_offset(offset : Int32, max : Int32) : ParseError
Creates an InvalidOffset error.
- .new(type : Type, message : String, details : String | Nil = nil)
-
.truncated_data(expected : Int32, actual : Int32) : ParseError
Creates a TruncatedData error.
Instance Method Summary
Constructor Detail
def self.invalid_header(field : String, value : Int16) : ParseError
#
Creates an InvalidHeader error.
def self.invalid_magic(actual : Int16) : ParseError
#
Creates an InvalidMagic error. Magic numbers: 282 (0o432) for standard, 542 for extended format.
def self.truncated_data(expected : Int32, actual : Int32) : ParseError
#
Creates a TruncatedData error.