HTTP::OAI::Error(3pm)

HTTP::OAI::Error3pm

Encapsulates oai error codes

Methods

$err = new HTTP::OAI::Error(code=>'badArgument',[message=>'An incorrect argument was supplied'])

This constructor method returns a new HTTP::OAI::Error object.

If no message is specified, and the code is a valid OAI error code, the appropriate message from the OAI protocol document is the default message.

$code = $err->code([$code])

Returns and optionally sets the error name.

$msg = $err->message([$msg])

Returns and optionally sets the error message.

NOTE - noRecordsMatch

noRecordsMatch, without additional errors, is not treated as an error code. If noRecordsMatch was returned by a repository the HTTP::OAI::Response object will have a verb 'error' and will contain the noRecordsMatch error, however is_success will return true.

e.g.

        my $r = $ha->ListIdentifiers(metadataPrefix='oai_dc',from=>'3000-02-02');
        if( $r->is_success ) {
                print "Successful\n";
        } else {
                print "Failed\n";
        }
        print $r->verb, "\n";

Will print "Successful" followed by "error".

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 6 times.

  1. 6.0
  2. 7–8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

From libhttp-oai-perl 4.13-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.