pyx12.error_visitor¶
Visitor - Visits an error_handler composite
Classes¶
Params: fd - target file |
Functions¶
|
Replace non-ASCII codepoints with ? (0x3F). |
Module Contents¶
- pyx12.error_visitor.ascii_only(value)[source]¶
Replace non-ASCII codepoints with ? (0x3F).
The X12 997/999 acknowledgement output is ASCII-by-spec, but the input file may contain non-ASCII bytes that bubble through validation as bad_value payloads on element-level errors. The visitor must sanitize before writing them into IK404/AK4-04, otherwise the ack itself would carry the bad bytes (and the X12Writer’s ASCII encode would crash on file output).
? is in the X12 basic charset, so the substitute is always valid in any IK404/AK4-04 context.
- class pyx12.error_visitor.error_visitor(fd)[source]¶
Params: fd - target file
- Parameters:
fd (Any)
- visit_root_pre(errh)[source]¶
- Parameters:
errh (L{error_handler.err_handler}) – Error handler
- Return type:
None
- visit_root_post(errh)[source]¶
- Parameters:
errh (L{error_handler.err_handler}) – Error handler
- Return type:
None
- visit_isa_post(err_isa)[source]¶
Params: err_isa - error_isa instance
- Parameters:
err_isa (Any)
- Return type:
None
- visit_gs_post(err_gs)[source]¶
Params: err_gs - error_gs instance
- Parameters:
err_gs (Any)
- Return type:
None
- visit_st_post(err_st)[source]¶
Params: err_st - error_st instance
- Parameters:
err_st (Any)
- Return type:
None