public void setMediaText ( final String mediaText ) throws DOMException { try { final CSSOMParser parser = new CSSOMParser ( ) ; parser . setErrorHandler ( ThrowCssExceptionErrorHandler . INSTANCE ) ; final MediaQueryList sml = parser . parseMedia ( mediaText ) ; setMediaList ( sml ) ; } catch ( final CSSParseException e ) { throw new DOMException ( DOMException . SYNTAX_ERR , e . getLocalizedMessage ( ) ) ; } catch ( final IOException e ) { throw new DOMException ( DOMException . NOT_FOUND_ERR , e . getLocalizedMessage ( ) ) ; } }
Parses the given media text .