Code example for DOMException

0
    public void setEndSync(String endSync) throws DOMException {
        if (ENDSYNC_FIRST.equals(endSync) || ENDSYNC_LAST.equals(endSync) ||
                ENDSYNC_ALL.equals(endSync) || ENDSYNC_MEDIA.equals(endSync)) {
            mSmilElement.setAttribute(ENDSYNC_ATTRIBUTE_NAME, endSync);
        } else { // FIXME add the support for ID-Value and smil1.0-Id-value. 
            throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
                    "Unsupported endsync value" + endSync);
        } 
    } 
 
    @Override 
    public float getDur() { 
        float dur = super.getDur();
        if (dur == 0) {
            dur = getImplicitDuration();
        } 
        return dur;
    } 
 
    public float getImplicitDuration() { 
Experience pair programming with AI  Get Codota for Java