Open RichardCox09 opened 2 years ago
The example you give is not throwing an exception, at least not on https://jigsaw.w3.org/css-validator/#validate_by_input DO you have ways of reproducing this?
Hello,
first of all, sorry for taking so long to reply, I must have overread your comment.
Yes, you are totally right, the web-validator doesn't throw an exception.
BUT: If you try to validate it with the Java source code, it throws an exception. If you don't set the Medium of the ApplContext (ApplContext.setMedium()), it throws the Exception.
The exception comes from CssParser Line 6157, where it says
if (!values.end() && ac.getMedium() == null) { addError(new InvalidParamException("unrecognize", "", ac), values);
If you don't set the meidum, it is null, and the if
is true, so it adds an error.
My suspicion is that the web-validator has set a medium, could that be?
I hope this helps with recreating the problem.
Consider the following example:
Without my change, the validator threw and exception that there were too few arguments for the function.