summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Util.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-01-05 20:52:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:37:01 -0500
commita7bc3801f94891880a90b2974dfbadc9e9f8c2ee (patch)
tree2cc690d4b35022398e8062847f70982fd34585e0 /source4/pidl/lib/Parse/Pidl/Util.pm
parent38ba8bf8ba75c19ab8d34eb4862b05befc8e1497 (diff)
downloadsamba-a7bc3801f94891880a90b2974dfbadc9e9f8c2ee.tar.gz
samba-a7bc3801f94891880a90b2974dfbadc9e9f8c2ee.tar.bz2
samba-a7bc3801f94891880a90b2974dfbadc9e9f8c2ee.zip
r20567: Print proper errors with filename and line numbers in ParseExpr()
(This used to be commit f5dc1b47ecf18068a47f8f68016463ef4a55dc03)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Util.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Util.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Util.pm b/source4/pidl/lib/Parse/Pidl/Util.pm
index 2f3547bbb5..11e738fd13 100644
--- a/source4/pidl/lib/Parse/Pidl/Util.pm
+++ b/source4/pidl/lib/Parse/Pidl/Util.pm
@@ -13,6 +13,7 @@ $VERSION = '0.01';
use strict;
use Parse::Pidl::Expr;
+use Parse::Pidl qw(error);
#####################################################################
# a dumper wrapper to prevent dependence on the Data::Dumper module
@@ -97,15 +98,15 @@ sub useUintEnums()
return $useUintEnums;
}
-sub ParseExpr($$)
+sub ParseExpr($$$)
{
- my($expr, $varlist) = @_;
+ my($expr, $varlist, $e) = @_;
die("Undefined value in ParseExpr") if not defined($expr);
my $x = new Parse::Pidl::Expr();
- return $x->Run($expr, sub { my $x = shift; die(MyDumper($x)); },
+ return $x->Run($expr, sub { my $x = shift; error($e, $x); },
# Lookup fn
sub { my $x = shift;
return($varlist->{$x}) if (defined($varlist->{$x}));