[HtmlUnit] SVN: [15290] trunk/htmlunit/src/site/fml/faq.fml

rbri--- via HtmlUnit-develop <[email protected]>
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15290
          http://sourceforge.net/p/htmlunit/code/15290
Author:   rbri
Date:     2018-05-26 16:35:51 +0000 (Sat, 26 May 2018)
Log Message:
-----------
document SilentCssErrorHandler

Modified Paths:
--------------
    trunk/htmlunit/src/site/fml/faq.fml

Modified: trunk/htmlunit/src/site/fml/faq.fml
===================================================================
--- trunk/htmlunit/src/site/fml/faq.fml	2018-05-23 18:15:25 UTC (rev 15289)
+++ trunk/htmlunit/src/site/fml/faq.fml	2018-05-26 16:35:51 UTC (rev 15290)
@@ -165,8 +165,7 @@
             <answer>
                 <source>
 26.02.2003 16:07:05 org.apache.commons.httpclient.HttpMethodBase   processRedirectResponse
-INFO: Redirect requested but followRedirects is disabled
-                </source>
+INFO: Redirect requested but followRedirects is disabled</source>
                 <p>
                     It's an annoyance that I haven't figured out how to fix yet.
                 </p>
@@ -184,6 +183,30 @@
             </answer>
         </faq>
 
+        <faq id="SilentCssErrorHandler">
+            <question>
+                There are many errors reported by the DefaultCssErrorHandler inside my log output. Can I ignore/disable these messages?
+            </question>
+            <answer>
+                <p>
+                    This is because our CSS parser detects some problem with one of the css resources your page relies on.
+                    Usually you will see similar error messages if you open your browser debug output window and enable the css log
+                    message.
+                </p>
+                <p>
+                    At least if you are scraping web pages you can ignore this. To suppress the output use the SilentCssErrorHandler
+                    or implement your own CSSErrorHandler.
+                </p>
+            <source><![CDATA[
+
+        try (WebClient webClient = new WebClient(browserVersion)) {
+            webClient.setCssErrorHandler(new SilentCssErrorHandler());
+            ....
+        }
+            ]]></source>
+            </answer>
+        </faq>
+
         <faq id="Roadmap">
             <question>
                 What version will feature X be in?


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.