better error reporting
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 22 Oct 2010 22:03:49 +0000 (00:03 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 22 Oct 2010 22:03:49 +0000 (00:03 +0200)
server.pl

index 3d5850e..b19f1e4 100755 (executable)
--- a/server.pl
+++ b/server.pl
@@ -36,6 +36,7 @@ diag "SearchHandle ",Dumper($this);
     my $query;
 
     eval { $query = $rpn->{query}->render(); };
+       warn "ERROR: $@" if $@;
     if ( $@ && ref($@) ) {    ## Did someone/something report any errors?
         $this->{ERR_CODE} = $@->{errcode};
         $this->{ERR_STR}  = $@->{errstr};
@@ -171,6 +172,7 @@ print "render ", dump($this);
 my $from = 'COBISS';
 
 my $usemap = eval "${from}::usemap;";
+die $@ if $@;
 warn "# $from usermap ",dump($usemap);
 
     my $attributes = {};