W3C home > Mailing lists > Public > www-validator-cvs@w3.org > January 2014

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

From: CVS User ylafon <cvsmail@w3.org>
Date: Mon, 06 Jan 2014 06:43:29 +0000
Message-Id: <E1W03uL-0005sv-3p@roscoe.w3.org>
To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/parser
In directory roscoe:/tmp/cvs-serv22621/parser

Modified Files:
	CssError.java CssParseException.java 
Log Message:
escaping now done in templates, error and warning type surfaced in outputs (json and soap12 for now)

--- /sources/public/2002/css-validator/org/w3c/css/parser/CssError.java	2013/04/09 14:55:05	1.7
+++ /sources/public/2002/css-validator/org/w3c/css/parser/CssError.java	2014/01/06 06:43:29	1.8
@@ -1,5 +1,5 @@
 //
-// $Id: CssError.java,v 1.7 2013/04/09 14:55:05 ylafon Exp $
+// $Id: CssError.java,v 1.8 2014/01/06 06:43:29 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT and INRIA, 1997.
@@ -13,7 +13,7 @@
 /**
  * This class represents an unknown error during the parse.
  *
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
  */
 public class CssError {
 
@@ -97,19 +97,21 @@
 	/**
 	 * get the error type, null if undefined
 	 */
-	 public String getType() {
-		 if(type == null) {
-			 if (error == null) {
-				 return null;
-			 }
-			 if (error instanceof InvalidParamException) {
-				 InvalidParamException exception = (InvalidParamException) error;
-				 type = exception.getErrorType();
-			 } else {
-				 type = error.getClass().getName();
-			 }
-		 }
-		 return type;
-	 }
+	public String getType() {
+		if (type == null) {
+			if (error == null) {
+				return null;
+			}
+			if (error instanceof InvalidParamException) {
+				InvalidParamException exception = (InvalidParamException) error;
+				type = exception.getErrorType();
+			} else if (error instanceof CssParseException) {
+				type = ((CssParseException) error).getErrorType();
+			} else {
+				type = error.getClass().getName();
+			}
+		}
+		return type;
+	}
 }
 
--- /sources/public/2002/css-validator/org/w3c/css/parser/CssParseException.java	2011/08/29 07:21:00	1.6
+++ /sources/public/2002/css-validator/org/w3c/css/parser/CssParseException.java	2014/01/06 06:43:29	1.7
@@ -1,5 +1,5 @@
 //
-// $Id: CssParseException.java,v 1.6 2011/08/29 07:21:00 ylafon Exp $
+// $Id: CssParseException.java,v 1.7 2014/01/06 06:43:29 ylafon Exp $
 // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr)
 //
 // (c) COPYRIGHT MIT and INRIA, 1997.
@@ -8,12 +8,13 @@
 package org.w3c.css.parser;
 
 import org.w3c.css.parser.analyzer.ParseException;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 
 import java.util.ArrayList;
 
 /**
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
  */
 public class CssParseException extends ParseException {
 
@@ -147,4 +148,14 @@
     public CssExpression getExp() {
         return exp;
     }
+
+	public String getErrorType() {
+		if (parseException == null) {
+			return null;
+		}
+		if (parseException instanceof InvalidParamException) {
+			return ((InvalidParamException) parseException).getErrorType();
+		}
+		return parseException.getClass().toString();
+	}
 }
Received on Monday, 6 January 2014 06:43:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:56 UTC