GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
HTTP::OAI::Error(3) User Contributed Perl Documentation HTTP::OAI::Error(3)

HTTP::OAI::Error - Encapsulates OAI error codes

$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.

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".

2022-09-13 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.