-$Id: Changes,v 1.60 2007-04-18 11:19:10 mike Exp $
+$Id: Changes,v 1.61 2007-05-09 12:03:52 mike Exp $
Revision history for Perl extension Net::Z3950::ZOOM.
1.19 (IN PROGRESS)
+ - Add $conn->exception() method.
- Set version number for Net::Z3950 to 0.99 -- less than the
1.0 version number that will be used when it successfully
emulates the old Net::Z3950 module, but superseding the last
-# $Id: ZOOM.pm,v 1.47 2007-02-26 14:52:21 mike Exp $
+# $Id: ZOOM.pm,v 1.48 2007-05-09 12:03:52 mike Exp $
use strict;
use warnings;
return wantarray() ? ($errcode, $errmsg, $addinfo, $diagset) : $errcode;
}
+sub exception {
+ my $this = shift();
+
+ my($errcode, $errmsg, $addinfo, $diagset) = $this->error_x();
+ return undef if $errcode == 0;
+ return new ZOOM::Exception($errcode, $errmsg, $addinfo, $diagset);
+}
+
sub errcode {
my $this = shift();
return Net::Z3950::ZOOM::connection_errcode($this->_conn());
-# $Id: ZOOM.pod,v 1.42 2007-02-26 14:40:01 mike Exp $
+# $Id: ZOOM.pod,v 1.43 2007-05-09 12:03:52 mike Exp $
use strict;
use warnings;
See the C<ZOOM::Exception> for the interpretation of these elements.
+=head4 exception()
+
+ die $conn->exception();
+
+C<exception()> returns the same information as C<error_x()> in the
+form of a C<ZOOM::Exception> object which may be thrown or rendered.
+If no error occurred on the connection, then C<exception()> returns an
+undefined value.
+
=head4 check()
$conn->check();