Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C7C478B9 for ; Tue, 4 Oct 2011 20:07:58 +0000 (UTC) Received: (qmail 52879 invoked by uid 500); 4 Oct 2011 20:07:58 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 52847 invoked by uid 500); 4 Oct 2011 20:07:58 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 52839 invoked by uid 500); 4 Oct 2011 20:07:58 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 52814 invoked by uid 99); 4 Oct 2011 20:07:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 20:07:58 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 20:07:55 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 47A9E2A9D83 for ; Tue, 4 Oct 2011 20:07:34 +0000 (UTC) Date: Tue, 4 Oct 2011 20:07:34 +0000 (UTC) From: "Olga Natkovich (Updated) (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <481062228.8966.1317758854295.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1931373888.4284.1300212698537.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-1908) display the contents of line and indicate the position of the erroneous token for syntax errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PIG-1908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olga Natkovich updated PIG-1908: -------------------------------- Fix Version/s: (was: 0.10) > display the contents of line and indicate the position of the erroneous token for syntax errors > ----------------------------------------------------------------------------------------------- > > Key: PIG-1908 > URL: https://issues.apache.org/jira/browse/PIG-1908 > Project: Pig > Issue Type: Improvement > Affects Versions: 0.9.0 > Reporter: Thejas M Nair > Assignee: Xuefu Zhang > > With latest version of the parser, the line number and position of the erroneous token are displayed. > For example - > {code} > > cat err.pig > l = load 'x' ; > f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3; > dump f1; > > pig -x local err.pig > 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON > {code} > It will be easier for to identify the reason for syntax error if the message also prints the line contents and indicates the position. This is specially useful if the script and/or line is long. > For example, the error message could be - > {code} > 2011-03-15 11:06:06,563 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. line 2:48 mismatched input ['$3'] expecting SEMI_COLON > f1 = foreach l generate $1, $2, $3, $4 + $3, $5 $3; > ^ > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira