ParseError
Mojo struct 🡭
ParseError
Section titled “ParseError”@memory_onlystruct ParseErrorError raised during FASTQ parsing with contextual information.
Fields
Section titled “Fields”- message (
String) - record_number (
Int) - line_number (
Int) - file_position (
Int64) - record_snippet (
String)
Implemented traits
Section titled “Implemented traits”AnyType, ImplicitlyDestructible, Writable
Methods
Section titled “Methods”__init__
Section titled “__init__”def __init__(out self, message: String, record_number: Int = 0, line_number: Int = 0, file_position: Int64 = 0, record_snippet: String = "")Initialize ParseError with message and optional context.
Args:
- message (
String): The error message. - record_number (
Int): 1-indexed record number where error occurred (0 if unknown). - line_number (
Int): 1-indexed line number in file (0 if unknown). - file_position (
Int64): Byte position in file (0 if unknown). - record_snippet (
String): First 100-200 chars of problematic record (empty if unavailable). - self (
Self)
Returns:
Self
write_to
Section titled “write_to”def write_to[w: Writer](self, mut writer: w)Write error to writer without building an intermediate String.
Parameters:
- w (
Writer)
Args:
- self (
Self) - writer (
w)