pyx12.error_handler¶
Interface to X12 Errors
Attributes¶
Exceptions¶
Class for errh_null errors. |
Classes¶
Iterate over the error tree |
|
The interface to the error handling structures. |
|
Holds source ISA loop errors |
|
Holds source GS loop information |
|
ST loops |
|
Segment Errors |
|
Element Errors - Holds and generates output for element and |
|
A null error object - used for testing. |
|
Capture validation errors in a list |
Module Contents¶
- class pyx12.error_handler.err_iter(errh)[source]¶
Iterate over the error tree
Implements an odd iterator???
- Parameters:
errh (L{error_handler.err_handler}) – Error_handler instance
- class pyx12.error_handler.err_handler[source]¶
The interface to the error handling structures.
- accept(visitor)[source]¶
Params: visitor - ref to visitor class
- Parameters:
visitor (Any)
- Return type:
None
- add_isa_loop(seg_data, src)[source]¶
- Parameters:
seg_data (L{segment<segment.Segment>}) – Segment object
src (Any)
- Return type:
None
- add_gs_loop(seg_data, src)[source]¶
- Parameters:
seg_data (L{segment<segment.Segment>}) – Segment object
src (Any)
- Return type:
None
- add_st_loop(seg_data, src)[source]¶
- Parameters:
seg_data (L{segment<segment.Segment>}) – Segment object
src (Any)
- Return type:
None
- isa_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – ISA level error code
err_str (string) – Description of the error
- Return type:
None
- gs_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – GS level error code
err_str (string) – Description of the error
- Return type:
None
- st_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – Segment level error code
err_str (string) – Description of the error
- Return type:
None
- class pyx12.error_handler.err_node(parent)[source]¶
- Parameters:
parent (Any)
- class pyx12.error_handler.err_isa(parent, seg_data, src)[source]¶
Bases:
err_nodeHolds source ISA loop errors
- Parameters:
seg_data (L{segment<segment.Segment>}) – Segment object
src (L{X12file<x12file.X12Reader>}) – X12file source
parent (Any)
- seg_data: pyx12.segment.Segment[source]¶
- accept(visitor)[source]¶
Params: visitor - ref to visitor class
- Parameters:
visitor (Any)
- Return type:
None
- class pyx12.error_handler.err_gs(parent, seg_data, src)[source]¶
Bases:
err_nodeHolds source GS loop information
- Parameters:
seg_data (L{segment<segment.Segment>}) – Segment object
src (L{X12file<x12file.X12Reader>}) – X12file source
parent (Any)
- seg_data: pyx12.segment.Segment[source]¶
- accept(visitor)[source]¶
Params: visitor - ref to visitor class
- Parameters:
visitor (Any)
- Return type:
None
- add_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – Error code
err_str (string) – Description of the error
- Return type:
None
- close(node, seg_data, src)[source]¶
- Parameters:
node (Any)
seg_data (pyx12.segment.Segment | None)
src (Any)
- Return type:
None
- class pyx12.error_handler.err_st(parent, seg_data, src)[source]¶
Bases:
err_nodeST loops
- Needs:
Transaction set id code (837, 834)
Transaction set control number
trn set error codes
At SE, Determine final ack code
- Parameters:
seg_data (L{segment<segment.Segment>}) – Segment object
src (L{X12file<x12file.X12Reader>}) – X12file source
parent (Any)
- seg_data: pyx12.segment.Segment[source]¶
- accept(visitor)[source]¶
Params: visitor - ref to visitor class
- Parameters:
visitor (Any)
- Return type:
None
- add_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – Error code
err_str (string) – Description of the error
- Return type:
None
- close(node, seg_data, src)[source]¶
Close ST loop
- Parameters:
node (L{node<map_if.x12_node>}) – SE node
seg_data (L{segment<segment.Segment>}) – Segment object
src (L{X12file<x12file.X12Reader>}) – X12file source
- Return type:
None
- class pyx12.error_handler.err_seg(parent, map_node, seg_data, seg_count, cur_line, ls_id)[source]¶
Bases:
err_nodeSegment Errors
Needs:
seg_id_code
seg_pos - pos in ST loop
loop_id - LS loop id
seg_count - in parent
- Parameters:
parent (Any)
map_node (Any)
seg_data (pyx12.segment.Segment)
seg_count (int)
cur_line (int)
ls_id (str | None)
- accept(visitor)[source]¶
Params: visitor - ref to visitor class
- Parameters:
visitor (Any)
- Return type:
None
- class pyx12.error_handler.err_ele(parent, map_node)[source]¶
Bases:
err_nodeElement Errors - Holds and generates output for element and composite/sub-element errors
Each element with an error creates a new err_ele instance.
- Parameters:
parent (Any)
map_node (Any)
- accept(visitor)[source]¶
Params: visitor - ref to visitor class
- Parameters:
visitor (Any)
- Return type:
None
- exception pyx12.error_handler.ErrorErrhNull[source]¶
Bases:
ExceptionClass for errh_null errors.
Initialize self. See help(type(self)) for accurate signature.
- class pyx12.error_handler.errh_null[source]¶
A null error object - used for testing. Stores the current error in simple variables.
- isa_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – ISA level error code
err_str (string) – Description of the error
- Return type:
None
- gs_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – GS level error code
err_str (string) – Description of the error
- Return type:
None
- st_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – Segment level error code
err_str (string) – Description of the error
- Return type:
None
- class pyx12.error_handler.errh_list[source]¶
Capture validation errors in a list Used to refactor away from error_handler
- isa_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – ISA level error code
err_str (string) – Description of the error
- Return type:
None
- gs_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – GS level error code
err_str (string) – Description of the error
- Return type:
None
- st_error(err_cde, err_str)[source]¶
- Parameters:
err_cde (string) – Segment level error code
err_str (string) – Description of the error
- Return type:
None
- close_isa_loop(node, seg, src)[source]¶
- Parameters:
node (Any)
seg (Any)
src (Any)
- Return type:
None