Hi all.

I Have a taglib which roughly resembles what I have inserted at the bottom of this mail. I don't seem to be able to catch any exceptions thrown by the $history->add_entry (even if I hardcode it to do just that). I am however able to catch die's if I issue them directly from the insert() sub. Am I doing something wrong here, because this worked before I switched to TaglibHelper?

use Apache::ModuleConfig ();
use Apache::Reload;
use Apache::AxKit::Language::XSP::TaglibHelper;

use Find::Repository::SearchHistory;

use vars qw/@ISA $NS $VERSION @EXPORT_TAGLIB/;

@ISA     = ('Apache::AxKit::Language::XSP');
$NS      = 'http://dtv.dk/xsp/search-history/v1';
$VERSION = "1.0";

sub parse_char { Apache::AxKit::Language::XSP::TaglibHelper::parse_char(@_); }
sub parse_start { Apache::AxKit::Language::XSP::TaglibHelper::parse_start(@_); }
sub parse_end { Apache::AxKit::Language::XSP::TaglibHelper::parse_end(@_); }


@EXPORT_TAGLIB = (
    'set_history($id, $query):isreally=insert',
);

sub insert {
    my ($id, $query) = @_;

eval {
my $history = new Find::Repository::SearchHistory();
my $cfg = Apache::ModuleConfig->get(AxKit::Apache->request(), "Find::Setup");


        $history->add_entry($id, $query);
    };
    if ($@) {
        die "DEBUG: $@";
    }
    return 1;
}

Kind regards
--
Jan Bauer Nielsen
Center of Knowledge Technology, Technical Knowledge Center of Denmark
Anker Engelunds Vej 1, Postboks 777, 2800 Kongens Lyngby, Denmark
Direct: (+45) 4525 7221, [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to