- From: Karl Dubost via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 14 Dec 2006 05:55:01 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/css In directory hutz:/tmp/cvs-serv29145 Modified Files: StyleSheetGeneratorHTML2.java Log Message: fixing the codecontext for errors Index: StyleSheetGeneratorHTML2.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleSheetGeneratorHTML2.java,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- StyleSheetGeneratorHTML2.java 14 Dec 2006 05:35:10 -0000 1.40 +++ StyleSheetGeneratorHTML2.java 14 Dec 2006 05:54:59 -0000 1.41 @@ -190,13 +190,10 @@ // if the list is not null, add a comma if (t != null) { buf.append(t); - if (e.hasMoreElements()) - buf.append(", "); + if (e.hasMoreElements()) {buf.append(", ");} } } - if (buf.length() != 0) { - ret.append(buf); - } + if (buf.length() != 0) {ret.append(buf);} ret.append("</td>"); ret.append("\n <td class='message'>"); } @@ -268,27 +265,33 @@ if (ex instanceof FileNotFoundException) { + ret.append("<td colspan='2' class='notfound'> "); ret.append(ac.getMsg().getGeneratorString("not-found")); - ret.append("<span class='notfound'> "); ret.append(ex.getMessage()); - ret.append("</span>"); + } else if (ex instanceof CssParseException) { produceParseException((CssParseException) ex, ret); - } else if (ex instanceof InvalidParamException) { + + } else if (ex instanceof InvalidParamException) { + ret.append("<td colspan='2' class='invalidparam'> "); ret.append(queryReplace(ex.getMessage())); - } else if (ex instanceof IOException) { + + } else if (ex instanceof IOException) { String stringError = ex.toString(); int index = stringError.indexOf(':'); ret.append(stringError.substring(0, index)); - ret.append("<span class='io'>"); - ret.append(ex.getMessage()).append("</span>"); - } else if (error[i] instanceof CssErrorToken) { + ret.append("<td colspan='2' class='io'> "); + ret.append(ex.getMessage()); + + } else if (error[i] instanceof CssErrorToken) { CssErrorToken terror = (CssErrorToken) error[i]; + ret.append("<td colspan='2' class='errortoken'> "); ret.append(terror.getErrorDescription()).append(" : "); ret.append(terror.getSkippedString()); + } else { - ret.append("<span class='uncaught-error'>Uncaught error</span>"); - ret.append(ex).append('\n'); + ret.append("<td colspan='2' class='notfound'>Unknown Error"); + ret.append(ex); if (ex instanceof NullPointerException) { // ohoh, a bug ex.printStackTrace();
Received on Thursday, 14 December 2006 05:55:03 UTC