Skip to content

Commit ab54b73

Browse files
committed
make sure exceptions are thrown
1 parent 89c7bce commit ab54b73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/gargoylesoftware/css/dom/CSSStyleDeclarationImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import com.gargoylesoftware.css.parser.CSSOMParser;
2424
import com.gargoylesoftware.css.util.LangUtils;
25+
import com.gargoylesoftware.css.util.ThrowCssExceptionErrorHandler;
2526

2627
/**
2728
* Implementation of CSSStyleDeclaration.
@@ -77,6 +78,7 @@ public String getCssText() {
7778
public void setCssText(final String cssText) throws DOMException {
7879
try {
7980
final CSSOMParser parser = new CSSOMParser();
81+
parser.setErrorHandler(ThrowCssExceptionErrorHandler.INSTANCE);
8082
properties_.clear();
8183
parser.parseStyleDeclaration(this, cssText);
8284
}

0 commit comments

Comments
 (0)