++ed by:
KLEE
1 non-PAUSE user
Author image Jakob Voß
and 4 contributors

NAME

PICA::Error - Information about malformed or invalid PICA data

DESCRIPTION

Instances of PICA::Error provide information about malformed PICA data (syntax errors such as impossible field tags and subfield codes) or violation of an Avram Schema (more semantic errors such as wrong use of subfields). This package should not be used directly, see PICA::Schema instead.

PROPERTIES

tag

Tag of the invalid field.

occurrence

Occurrence of the invalid field (if it has an occurrence).

required

Set if the field was required but missing.

repeated

Set if the non-repeatable field was repeated.

deprecated

Set if the field is valid but deprecated.

subfields

Set to a hash reference that maps invalid subfield codes to subfield errrors.

message

human-readable error message, deriveable from the rest of the error.

SUBFIELD ERRORS

Subfields errors are given as hash references with this keys:

code

Subfield code of the invalid subfield.

required

Set if the subfield was required but missing.

repeated

Set if the non-repeatable subfield was repeated.

order

Set to the expected order value if subfield occurred in wrong order.

value

The malformed subfield value if it did not match a pattern or positions.

pattern

Pattern which the subfield value did not match.

position

The position if value did not match positions or codes.

message

human-readable error message, deriveable from the rest of the error.

METHODS

message

Returns the human readable error message. This is also returned when the error instance is used in string context.