From: Peter Rabbitson Date: Sat, 28 Mar 2009 01:16:01 +0000 (+0000) Subject: Better test exception diag X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=09abf3a06717253ac4eb7859bf9145c1f9b1b5af;p=scpubgit%2FQ-Branch.git Better test exception diag --- diff --git a/lib/SQL/Abstract/Test.pm b/lib/SQL/Abstract/Test.pm index 28cbe71..82eed8f 100644 --- a/lib/SQL/Abstract/Test.pm +++ b/lib/SQL/Abstract/Test.pm @@ -331,8 +331,8 @@ sub _recurse_parse { # nested expression in () if ($token eq '(') { my $right = _recurse_parse($tokens, PARSE_IN_PARENS); - $token = shift @$tokens or croak "missing ')'"; - $token eq ')' or croak "unexpected token : $token"; + $token = shift @$tokens or croak "missing closing ')' around block " . unparse ($right); + $token eq ')' or croak "unexpected token '$token' terminating block " . unparse ($right); $left = $left ? [@$left, [PAREN => [$right] ]] : [PAREN => [$right] ]; }