CVS 2002/css-validator/org/w3c/css/parser

Update of /sources/public/2002/css-validator/org/w3c/css/parser
In directory roscoe:/tmp/cvs-serv14824

Modified Files:
	CssError.java CssFouffa.java CssParseException.java 
Log Message:
better output for types in parse exception

--- /sources/public/2002/css-validator/org/w3c/css/parser/CssError.java	2014/01/06 06:43:29	1.8
+++ /sources/public/2002/css-validator/org/w3c/css/parser/CssError.java	2014/01/09 09:21:05	1.9
@@ -1,5 +1,5 @@
 //
-// $Id: CssError.java,v 1.8 2014/01/06 06:43:29 ylafon Exp $
+// $Id: CssError.java,v 1.9 2014/01/09 09:21:05 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT and INRIA, 1997.
@@ -13,10 +13,12 @@
 /**
  * This class represents an unknown error during the parse.
  *
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
  */
 public class CssError {
 
+	static final String parserError = "generator.unrecognize";
+
 	/**
 	 * The source file
 	 */
--- /sources/public/2002/css-validator/org/w3c/css/parser/CssFouffa.java	2012/02/23 14:28:10	1.60
+++ /sources/public/2002/css-validator/org/w3c/css/parser/CssFouffa.java	2014/01/09 09:21:05	1.61
@@ -1,5 +1,5 @@
 //
-// $Id: CssFouffa.java,v 1.60 2012/02/23 14:28:10 ylafon Exp $
+// $Id: CssFouffa.java,v 1.61 2014/01/09 09:21:05 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT, ERCIM and Keio, 2003.
@@ -53,7 +53,7 @@
  * parser.parseStyle();<BR>
  * </code>
  *
- * @version $Revision: 1.60 $
+ * @version $Revision: 1.61 $
  */
 public final class CssFouffa extends CssParser {
 
@@ -645,7 +645,6 @@
      *
      * @param context The current context
      * @see org.w3c.css.parser.CssFouffa#addListener
-     * @see org.w3c.css.parser.CssSelectors#setElement
      */
     public void parseDeclarations(CssSelectors context) {
         // here we have an example for reusing the parser.
--- /sources/public/2002/css-validator/org/w3c/css/parser/CssParseException.java	2014/01/06 06:43:29	1.7
+++ /sources/public/2002/css-validator/org/w3c/css/parser/CssParseException.java	2014/01/09 09:21:05	1.8
@@ -1,5 +1,5 @@
 //
-// $Id: CssParseException.java,v 1.7 2014/01/06 06:43:29 ylafon Exp $
+// $Id: CssParseException.java,v 1.8 2014/01/09 09:21:05 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT and INRIA, 1997.
@@ -14,7 +14,7 @@
 import java.util.ArrayList;
 
 /**
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
  */
 public class CssParseException extends ParseException {
 
@@ -156,6 +156,9 @@
 		if (parseException instanceof InvalidParamException) {
 			return ((InvalidParamException) parseException).getErrorType();
 		}
+		if (parseException instanceof ParseException) {
+			return CssError.parserError;
+		}
 		return parseException.getClass().toString();
 	}
 }

Received on Thursday, 9 January 2014 09:21:06 UTC