vaadin / sass-compiler

A Java Sass compiler implementation
53 stars 25 forks source link

Improve type mismatch and unresolved variable exception messages #307

Open hesara opened 7 years ago

hesara commented 7 years ago

This change is Reviewable

CLAassistant commented 7 years ago

CLA assistant check
All committers have signed the CLA.

denis-anisimov commented 7 years ago

Reviewed 3 of 3 files at r1. Review status: all files reviewed at latest revision, 2 unresolved discussions.


src/main/java/com/vaadin/sass/internal/parser/LexicalUnitImpl.java, line 408 at r1 (raw file):

        if (getLexicalUnitType() == SCSS_VARIABLE) {
            // still unresolved
            throw new UnresolvedReferenceException("unresolved:" + this);

Is this message is informative enough ? What's this.toString() here? Is it enough to understand its nature ? Is it variable or what ?


src/main/java/com/vaadin/sass/internal/parser/LexicalUnitImpl.java, line 412 at r1 (raw file):

        if (another.getLexicalUnitType() == SCSS_VARIABLE) {
            // still unresolved
            throw new UnresolvedReferenceException("unresolved:" + another);

Same here.


Comments from Reviewable