more friendly exception message in PlainText #144

pull/157/head
yihua.huang 11 years ago
parent ebb931e0bf
commit 4e6e946dd7

@ -29,27 +29,27 @@ public class PlainText extends AbstractSelectable {
@Override @Override
public Selectable xpath(String xpath) { public Selectable xpath(String xpath) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException("XPath can not apply to plain text. Please check whether you use a previous xpath with attribute select (/@href etc).");
} }
@Override @Override
public Selectable $(String selector) { public Selectable $(String selector) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException("$ can not apply to plain text. Please check whether you use a previous xpath with attribute select (/@href etc).");
} }
@Override @Override
public Selectable $(String selector, String attrName) { public Selectable $(String selector, String attrName) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException("$ can not apply to plain text. Please check whether you use a previous xpath with attribute select (/@href etc).");
} }
@Override @Override
public Selectable smartContent() { public Selectable smartContent() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException("Smart content can not apply to plain text. Please check whether you use a previous xpath with attribute select (/@href etc).");
} }
@Override @Override
public Selectable links() { public Selectable links() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException("Links can not apply to plain text. Please check whether you use a previous xpath with attribute select (/@href etc).");
} }
@Override @Override

Loading…
Cancel
Save