- From: CVS User ylafon <cvsmail@w3.org>
- Date: Mon, 06 Jan 2014 06:43:29 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/util In directory roscoe:/tmp/cvs-serv22621/util Modified Files: InterruptedGetException.java InvalidAccesException.java InvalidHTTPAccesException.java InvalidParamException.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/util/InterruptedGetException.java 2007/11/26 05:07:17 1.5 +++ /sources/public/2002/css-validator/org/w3c/css/util/InterruptedGetException.java 2014/01/06 06:43:29 1.6 @@ -1,5 +1,5 @@ // InterruptedGetException.java -// $Id: InterruptedGetException.java,v 1.5 2007/11/26 05:07:17 ot Exp $ +// $Id: InterruptedGetException.java,v 1.6 2014/01/06 06:43:29 ylafon Exp $ // (c) COPYRIGHT MIT, INRIA and Keio, 1999. // Please first read the full copyright statement in file COPYRIGHT.html @@ -9,16 +9,17 @@ /** * Thrown when a HTTP Get is interrupted - * @version $Revision: 1.5 $ - * @author Benoit Mahe (bmahe@w3.org) + * + * @author Benoit Mahe (bmahe@w3.org) + * @version $Revision: 1.6 $ */ public class InterruptedGetException extends IOException { - public long bytesTransferred = 0; - public long bytesExpected = 0; + public long bytesTransferred = 0; + public long bytesExpected = 0; - public InterruptedGetException(String message) { - super(message); - } + public InterruptedGetException(String message) { + super(message); + } } --- /sources/public/2002/css-validator/org/w3c/css/util/InvalidAccesException.java 2005/09/14 15:15:32 1.3 +++ /sources/public/2002/css-validator/org/w3c/css/util/InvalidAccesException.java 2014/01/06 06:43:29 1.4 @@ -9,32 +9,32 @@ * PURPOSE. * See W3C License http://www.w3.org/Consortium/Legal/ for more details. * - * $Id: InvalidAccesException.java,v 1.3 2005/09/14 15:15:32 ylafon Exp $ + * $Id: InvalidAccesException.java,v 1.4 2014/01/06 06:43:29 ylafon Exp $ */ /** * InvalidAccesException is a runtime exception throwed when an acces is * impossible to a ressource. * - * @version $Revision: 1.3 $ - * @author Philippe Le Hegaret + * @version $Revision: 1.4 $ + * @author Philippe Le Hegaret */ package org.w3c.css.util; public class InvalidAccesException extends RuntimeException { - /** - * Creates a new InvalidAccesException - */ - public InvalidAccesException() { - super(); - } + /** + * Creates a new InvalidAccesException + */ + public InvalidAccesException() { + super(); + } - /** - * Creates a new InvalidAccesException with a specified string - */ - public InvalidAccesException(String s) { - super(s); - } + /** + * Creates a new InvalidAccesException with a specified string + */ + public InvalidAccesException(String s) { + super(s); + } } --- /sources/public/2002/css-validator/org/w3c/css/util/InvalidHTTPAccesException.java 2005/09/14 15:15:32 1.4 +++ /sources/public/2002/css-validator/org/w3c/css/util/InvalidHTTPAccesException.java 2014/01/06 06:43:29 1.5 @@ -9,7 +9,7 @@ * PURPOSE. * See W3C License http://www.w3.org/Consortium/Legal/ for more details. * - * $Id: InvalidHTTPAccesException.java,v 1.4 2005/09/14 15:15:32 ylafon Exp $ + * $Id: InvalidHTTPAccesException.java,v 1.5 2014/01/06 06:43:29 ylafon Exp $ */ package org.w3c.css.util; @@ -19,71 +19,71 @@ * InvalidAccesException is a runtime exception throwed when an acces is * impossible to a HTTP ressource. * - * @version $Revision: 1.4 $ - * @author Philippe Le Hegaret + * @author Philippe Le Hegaret + * @version $Revision: 1.5 $ */ public class InvalidHTTPAccesException extends InvalidAccesException { - // HTTP reason - int status; + // HTTP reason + int status; - // HTTP requested uri - String uri; + // HTTP requested uri + String uri; - // message - String message; + // message + String message; - // additional informations + // additional informations Utf8Properties informations; - /** - * Creates a new InvalidHTTPAccesException - */ + /** + * Creates a new InvalidHTTPAccesException + */ public InvalidHTTPAccesException(int status, String uri, String message, - Utf8Properties informations) { - super(message); - this.status = status; - this.uri = uri; - this.message = message; - this.informations = informations; - } - - /** - * Creates a new InvalidHTTPAccesException - */ + Utf8Properties informations) { + super(message); + this.status = status; + this.uri = uri; + this.message = message; + this.informations = informations; + } + + /** + * Creates a new InvalidHTTPAccesException + */ public InvalidHTTPAccesException(int status, String uri, String message) { - this(status, uri, message, null); - } + this(status, uri, message, null); + } - /** + /** * Returns the HTTP reason of the failure NOT_FOUND, UNAUTHORIZED, ... - */ - public int getHTTPReason() { - return status; - } - - /** - * Get the requested URI - */ - public String getURI() { - return uri; - } + */ + public int getHTTPReason() { + return status; + } + + /** + * Get the requested URI + */ + public String getURI() { + return uri; + } - /** + /** * Get the error message The message can come from the server or from the * application. - */ - public String getMessage() { - return message; - } + */ + public String getMessage() { + return message; + } - /** + /** * Returns some additionals HTTP information. These informations are useful * if you want to reply to the client For example, if the HTTP reason is * UNAUTHORIZED, it will contain the header WWW-Authenticate and * Authentication-Info. - */ + */ public Utf8Properties getInformations() { - return informations; - } + return informations; + } } --- /sources/public/2002/css-validator/org/w3c/css/util/InvalidParamException.java 2013/04/09 14:55:04 1.13 +++ /sources/public/2002/css-validator/org/w3c/css/util/InvalidParamException.java 2014/01/06 06:43:29 1.14 @@ -1,5 +1,5 @@ // -// $Id: InvalidParamException.java,v 1.13 2013/04/09 14:55:04 ylafon Exp $ +// $Id: InvalidParamException.java,v 1.14 2014/01/06 06:43:29 ylafon Exp $ // From Philippe Le Hegaret (Philippe.Le_Hegaret@sophia.inria.fr) // // (c) COPYRIGHT MIT and INRIA, 1997. @@ -10,106 +10,107 @@ import org.w3c.css.parser.analyzer.ParseException; /** - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ */ public class InvalidParamException extends ParseException { String errorType = null; - /** - * Create a new InvalidParamException. - */ - public InvalidParamException() { - super(); - } - - /** - * Create a new InvalidParamException with an error message. - * - * @param message the error message - */ - public InvalidParamException(String message, ApplContext ac) { - super(ac.getMsg().getErrorString((message != null) ? message : "")); + /** + * Create a new InvalidParamException. + */ + public InvalidParamException() { + super(); + } + + /** + * Create a new InvalidParamException with an error message. + * + * @param message the error message + */ + public InvalidParamException(String message, ApplContext ac) { + super(ac.getMsg().getErrorString((message != null) ? message : "")); errorType = message; - } + } - /** - * Create a new InvalidParamException with an error message class. - * - * @param error the error message class. - * @param message a message to add - */ - public InvalidParamException(String error, Object message, ApplContext ac) { - super(processError(error, (message != null) ? message : null, ac)); + /** + * Create a new InvalidParamException with an error message class. + * + * @param error the error message class. + * @param message a message to add + */ + public InvalidParamException(String error, Object message, ApplContext ac) { + super(processError(error, (message != null) ? message : null, ac)); errorType = error; - } + } - /** - * Create a new InvalidParamException with an error message class. - * - * @param error the error message class. - * @param args a string array of messages to add - */ - public InvalidParamException(String error, String[] args, ApplContext ac) { - super(processError(error, args, ac)); + /** + * Create a new InvalidParamException with an error message class. + * + * @param error the error message class. + * @param args a string array of messages to add + */ + public InvalidParamException(String error, String[] args, ApplContext ac) { + super(processError(error, args, ac)); errorType = error; - } + } - /** - * Create a new InvalidParamException. - * - * @param error the error message class - * @param message1 the first message to add - * @param message1 the second message to add - */ - public InvalidParamException(String error, Object message1, - Object message2, ApplContext ac) { - super(processError(error, - (message1 != null) ? message1.toString() : null, - (message2 != null) ? message2.toString() : null, - ac)); + /** + * Create a new InvalidParamException. + * + * @param error the error message class + * @param message1 the first message to add + * @param message1 the second message to add + */ + public InvalidParamException(String error, Object message1, + Object message2, ApplContext ac) { + super(processError(error, + (message1 != null) ? message1.toString() : null, + (message2 != null) ? message2.toString() : null, + ac)); errorType = error; - } + } /** * Get the error type if defined + * * @return a String or null if undefined */ public String getErrorType() { return errorType; } - private static String processError(String error, String[] args, ApplContext ac) { - StringBuilder sb = new StringBuilder(); - String str = null; - - if (error != null) { - str = ac.getMsg().getErrorString(error); - } - if (str == null) { - return "can't find the error message for " + error; - } - // replace all parameters - String[] msg_parts = str.split("%s", -1); - int j = 0; - sb.append(msg_parts[0]); - for (int i = 1; i < msg_parts.length; i++) { - if (j < args.length) { - sb.append(args[j++]); - } - sb.append(msg_parts[i]); - } - return sb.toString(); - } - - private static String processError(String error, Object args, ApplContext ac) { - String sa[] = {args.toString()}; - return processError(error, sa, ac); - } - - private static String processError(String error, String arg1, - String arg2, ApplContext ac) { - String sa[] = {arg1, arg2}; - return processError(error, sa, ac); - } + private static String processError(String error, String[] args, ApplContext ac) { + StringBuilder sb = new StringBuilder(); + String str = null; + + if (error != null) { + str = ac.getMsg().getErrorString(error); + } + if (str == null) { + return "can't find the error message for " + error; + } + // replace all parameters + String[] msg_parts = str.split("%s", -1); + int j = 0; + sb.append(msg_parts[0]); + for (int i = 1; i < msg_parts.length; i++) { + if (j < args.length) { + sb.append(args[j++]); + } + sb.append(msg_parts[i]); + } + return sb.toString(); + } + + private static String processError(String error, Object args, ApplContext ac) { + String sa[] = {args.toString()}; + return processError(error, sa, ac); + } + + private static String processError(String error, String arg1, + String arg2, ApplContext ac) { + String sa[] = {arg1, arg2}; + return processError(error, sa, ac); + } } // InvalidParamException
Received on Monday, 6 January 2014 06:43:33 UTC