directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1149236 - in /directory/shared/trunk: i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java
Date Thu, 21 Jul 2011 15:50:07 GMT
Author: pamarcelot
Date: Thu Jul 21 15:50:06 2011
New Revision: 1149236

URL: http://svn.apache.org/viewvc?rev=1149236&view=rev
Log:
Improved error reporting for the ACIItemParser by adding line and column of the parser error.

Modified:
    directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
    directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java

Modified: directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties?rev=1149236&r1=1149235&r2=1149236&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
(original)
+++ directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
Thu Jul 21 15:50:06 2011
@@ -126,7 +126,7 @@ ERR_03040=unable to find the batch reque
 ERR_04001_NULL_IDENTIFICATION_TAG=identificationTag parameter is null
 ERR_04002_BAD_PRECENDENCE=precedence parameter not in [0-255] : {0}
 ERR_04003_NULL_AUTHENTICATION_LEVEL=authenticationLevel parameter is null
-ERR_04004_PARSER_FAILURE_ACI_ITEM=Parser failure on ACIItem\:\n\t{0}\nAntlr exception trace\:\n{1}
+ERR_04004_PARSER_FAILURE_ACI_ITEM=Parser failure on ACIItem\:\n\t{0}\nAntlr exception trace\:\n{1}
[Line:{2} - Column:{3}]
 ERR_04005=The PDU buffer size is too small !
 ERR_04006=The And filter PDU must not be empty
 ERR_04007=The attribute description is empty

Modified: directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java?rev=1149236&r1=1149235&r2=1149236&view=diff
==============================================================================
--- directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java
(original)
+++ directory/shared/trunk/ldap/extras/aci/src/main/java/org/apache/directory/shared/ldap/aci/ACIItemParser.java
Thu Jul 21 15:50:06 2011
@@ -64,7 +64,7 @@ public class ACIItemParser
         // this method MUST be called while we cannot do
         // constructor overloading for antlr generated parser
         this.parser.init( schemaManager );
-        
+
         this.isNormalizing = false;
     }
 
@@ -85,7 +85,7 @@ public class ACIItemParser
 
         // this method MUST be called while we cannot do
         // constructor overloading for antlr generated parser
-        this.parser.init( schemaManager ); 
+        this.parser.init( schemaManager );
     }
 
 
@@ -132,8 +132,10 @@ public class ACIItemParser
         }
         catch ( RecognitionException e )
         {
-            throw new ParseException( I18n
-                .err( I18n.ERR_04004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage()
), e.getColumn() );
+            throw new ParseException(
+                I18n
+                    .err( I18n.ERR_04004_PARSER_FAILURE_ACI_ITEM, spec, e.getLocalizedMessage(),
e.getLine(),
+                        e.getColumn() ), e.getColumn() );
         }
 
         return aCIItem;



Mime
View raw message