private void reportUnexpected(String expected, int ch, StringBuffer context)
            throws DatatypeException {
        if (ch != -1) {
            throw newDatatypeException("Expected " + expected
                    + " but found \u201c" + (char) ch + "\u201d instead "
                    + "(context: \u201c" + context.toString() + "\u201d).");
        } else {
            throw newDatatypeException("Expected " + expected
                    + " but value ended " + "(context: \u201c"
                    + context.toString() + "\u201d).");
        }
    }
Skips the whitespaces and an optional comma.
src/nu/validator/datatype/SvgPathData.java