Index: pom.xml
===================================================================
--- pom.xml	(revision 17901)
+++ pom.xml	(working copy)
@@ -23,6 +23,7 @@
         <configuration>
           <includes>
             <include>**/RenderingTests.java</include>
+            <include>**/ExceptionTests.java</include>
           </includes>
         </configuration>
       </plugin>
Index: src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
===================================================================
--- src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java	(revision 17901)
+++ src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java	(working copy)
@@ -20,6 +20,7 @@
 
 package org.xwiki.rendering.internal.macro.rss;
 
+import java.net.URLConnection;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
@@ -56,6 +57,21 @@
 public class RssMacro extends AbstractMacro<RssMacroParameters>
 {
     /**
+     * Predefined error message.
+     */
+    public static final String PARAMETER_MISSING_ERROR = "The required 'feed' parameter is missing.";
+
+    /**
+     * Predefined error message. It will be added the host's address when thrown.
+     */
+    public static final String CONNECTION_TIMEOUT_ERROR = "Connection timeout when trying to reach ";
+
+    /**
+     * Predefined error message. It will be added the host's address when thrown.
+     */
+    public static final String INVALID_DOCUMENT_ERROR = "No feed found at ";
+    
+    /**
      * The name of the CSS class attribute.
      */
     private static final String CLASS_ATTRIBUTE = "class";
@@ -122,9 +138,7 @@
             Block titleBlock = new LinkBlock(
                 getParserUtils().parseInlineNonWiki(entry.getTitle()), titleLink, true);
             ParagraphBlock paragraphTitleBlock = new ParagraphBlock(Collections.singletonList(titleBlock));
-            if (parameters.isCss()) {
-                paragraphTitleBlock.setParameter(CLASS_ATTRIBUTE, "rssitemtitle");
-            }
+            paragraphTitleBlock.setParameter(CLASS_ATTRIBUTE, "rssitemtitle");
             parentBlock.addChild(paragraphTitleBlock);
             
             if (parameters.isContent() && entry.getDescription() != null) {
@@ -138,9 +152,7 @@
                     entry.getDescription().getValue(), context.isInline());
 
                 XMLElement xmlElement = new XMLElement("div");
-                if (parameters.isCss()) {
-                    xmlElement.setAttribute(CLASS_ATTRIBUTE, "rssitemdescription");
-                }
+                xmlElement.setAttribute(CLASS_ATTRIBUTE, "rssitemdescription");
                 parentBlock.addChild(new XMLBlock(Arrays.asList(html), xmlElement));
             }
         }
@@ -156,6 +168,13 @@
     }
 
     /**
+     * @return the maximum number of seconds to wait when inquiring the RSS feed provider.
+     */
+    protected static int getTimeoutSeconds() {
+        return 5;
+    }
+    
+    /**
      * {@inheritDoc}
      * 
      * @see org.xwiki.rendering.macro.Macro#execute(Object, String, MacroTransformationContext)
@@ -163,29 +182,40 @@
     public List<Block> execute(RssMacroParameters parameters, String content, MacroTransformationContext context)
         throws MacroExecutionException
     {
+        if (StringUtils.isEmpty(parameters.getFeed())) {
+            throw new MacroExecutionException(PARAMETER_MISSING_ERROR);
+        }
+        
         SyndFeedInput input = new SyndFeedInput();
         SyndFeed feed = null;
+        
         try {
-            feed = input.build(new XmlReader(parameters.getFeedURL()));
+            synchronized (this) {
+                URLConnection connection = parameters.getFeedURL().openConnection();
+                connection.setConnectTimeout(getTimeoutSeconds() * 1000);
+                feed = input.build(new XmlReader(connection));
+            }
         } catch (Exception ex) {
-            throw new MacroExecutionException("Error processing " + parameters.getFeedURL() + ": " + ex.getMessage());
+            if (ex.getClass().getName().equals("java.net.SocketTimeoutException")) {
+                throw new MacroExecutionException(CONNECTION_TIMEOUT_ERROR + parameters.getFeedURL());
+            }
+            throw new MacroExecutionException("Error processing " 
+                + parameters.getFeedURL() + ": " + ex.getMessage(), ex);
         }
         if (feed == null) { 
-            throw new MacroExecutionException("No feed found at " + parameters.getFeedURL());
+            throw new MacroExecutionException(INVALID_DOCUMENT_ERROR + parameters.getFeedURL());
         }
         
         BoxMacroParameters boxParameters = new BoxMacroParameters();
         boolean hasImage = parameters.isImage() && feed.getImage() != null;
 
-        if (parameters.isCss()) {
-            boxParameters.setCssClass("rssfeed");
-        }
+        boxParameters.setCssClass("rssfeed");
         
         if (!StringUtils.isEmpty(parameters.getWidth())) {
             boxParameters.setWidth(parameters.getWidth());
         }
         
-        renderFeedOrEntryTitle(boxParameters, parameters.isCss(), "rsschanneltitle", feed.getTitle(), feed.getLink());
+        renderFeedOrEntryTitle(boxParameters, "rsschanneltitle", feed.getTitle(), feed.getLink());
 
         List<Block> result = null;
         if (hasImage) {
@@ -203,12 +233,11 @@
     /**
      * Renders the RSS's title.
      * @param boxParameters the BoxParameters where the title will be fitted
-     * @param isCss whether CSS formatting should be applied
      * @param cssClass the CSS sheet
      * @param title the title's text
      * @param link the title's link (if there is one)
      */
-    private void renderFeedOrEntryTitle(BoxMacroParameters boxParameters, boolean isCss, 
+    private void renderFeedOrEntryTitle(BoxMacroParameters boxParameters, 
         String cssClass, String title, String link) {
         List<Block> titleBlocks = null;
         
@@ -222,9 +251,7 @@
             titleBlocks = Collections.singletonList(linkBlock);
         }
         ParagraphBlock titleBlock = new ParagraphBlock(titleBlocks);
-        if (isCss) {
-            titleBlock.setParameter(CLASS_ATTRIBUTE, cssClass);
-        }
+        titleBlock.setParameter(CLASS_ATTRIBUTE, cssClass);
         
         boxParameters.setBlockTitle(Collections.singletonList(titleBlock));
     }
Index: src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java
===================================================================
--- src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java	(revision 17901)
+++ src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java	(working copy)
@@ -60,12 +60,6 @@
     private String width = StringUtils.EMPTY;
 
     /**
-     * If "true" then adds class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc) which you
-     * can style by modifying your skin's CSS file.
-     */
-    private boolean css = true;
-
-    /**
      * The RSS feed URL.
      */
     private URL feedURL;
@@ -125,23 +119,6 @@
     }
 
     /**
-     * @param css whether to add class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc).
-     */
-    @ParameterDescription("Specifies whether to add class id elements (rssitem, rssitemtitle, rssitemdescription etc).")
-    public void setCss(boolean css)
-    {
-        this.css = css;
-    }
-
-    /**
-     * @return whether to add class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc).
-     */
-    public boolean isCss()
-    {
-        return this.css;
-    }
-
-    /**
      * @param count the number of feed items to display.
      */
     @ParameterDescription("The maximum number of feed items to display on the page.")
Index: src/test/java/org/xwiki/rendering/ExceptionTests.java
===================================================================
--- src/test/java/org/xwiki/rendering/ExceptionTests.java	(revision 0)
+++ src/test/java/org/xwiki/rendering/ExceptionTests.java	(revision 0)
@@ -0,0 +1,94 @@
+package org.xwiki.rendering;
+
+import java.net.MalformedURLException;
+
+import org.apache.commons.lang.StringUtils;
+import org.xwiki.rendering.internal.macro.rss.RssMacro;
+import org.xwiki.rendering.macro.Macro;
+import org.xwiki.rendering.macro.MacroExecutionException;
+import org.xwiki.rendering.macro.rss.RssMacroParameters;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests for {@link RssMacro}.
+ * 
+ * @version $Id: $
+ * @since 1.9
+ */
+public class ExceptionTests extends TestCase
+{
+    private Macro<RssMacroParameters> macro;
+    private RssMacroParameters parameters;
+    
+    public ExceptionTests(String name)
+    {
+        super(name);
+        macro = new RssMacro();
+        parameters = new RssMacroParameters();
+    }
+
+    /**
+     * Tests whether the macro throws the appropriate exception 
+     * in cases where the required 'feed' parameter is missing.
+     */
+    public final void testRequiredParameterMissing()
+    {
+        assertNotNull(macro);
+        assertNotNull(parameters);
+        if (StringUtils.isNotEmpty(parameters.getFeed())) {
+            parameters = new RssMacroParameters();
+        }
+        try {
+            macro.execute(parameters, null, null);
+        } catch (MacroExecutionException ex) {
+            assertTrue(RssMacro.PARAMETER_MISSING_ERROR.equals(ex.getMessage()));
+            return;
+        }
+        fail("No 'feed' parameter specified, the macro should throw an exception");
+    }
+    
+    /**
+     * Tests the macro's behavior when the server hosting the feeds doesn't respond.
+     * @throws MalformedURLException in case the provided feed's URL is invalid
+     */
+    public final void testConnectionTimeout() throws MalformedURLException
+    {
+        assertNotNull(macro);
+        assertNotNull(parameters);
+        
+        // We set the feed's URL to an unreachable address.
+        parameters.setFeed("http://22.22.22.22");
+        
+        try {
+            macro.execute(parameters, null, null);
+        } catch (MacroExecutionException ex) {
+            String errorMessage = ex.getMessage();
+            assertTrue(errorMessage.startsWith(RssMacro.CONNECTION_TIMEOUT_ERROR));
+            return;
+        }
+        fail("The macro should throw a 'Connection timeout exception'");
+    }
+
+    /**
+     * Tests the macro's behavior when the server hosting the feeds doesn't respond.
+     * @throws MalformedURLException in case the provided feed's URL is invalid
+     */
+    public final void testInvalidDocument() throws MalformedURLException
+    {
+        assertNotNull(macro);
+        assertNotNull(parameters);
+        
+        // We assume that there's no RSS feed at this address.
+        parameters.setFeed("http://www.xwiki.org");
+        
+        try {
+            macro.execute(parameters, null, null);
+        } catch (MacroExecutionException ex) {
+            assertTrue(ex.getCause() instanceof IllegalArgumentException); 
+            assertTrue("Invalid document".equals(ex.getCause().getMessage()));
+            return;
+        }
+        fail("The macro should throw an 'Ivalid document exception'");
+    }
+}
Index: src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro.java
===================================================================
--- src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro.java	(revision 17901)
+++ src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro.java	(working copy)
@@ -48,7 +48,6 @@
     {
         RssMacroParameters rssParameters = new RssMacroParameters();
         rssParameters.setContent(true);
-        rssParameters.setCss(true);
         rssParameters.setCount(2);
         rssParameters.setImage(true);
         
Index: src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro2.java
===================================================================
--- src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro2.java	(revision 17901)
+++ src/test/java/org/xwiki/rendering/macro/rss/TestRssMacro2.java	(working copy)
@@ -22,7 +22,6 @@
     {
         RssMacroParameters rssParameters = new RssMacroParameters();
         rssParameters.setContent(true);
-        rssParameters.setCss(true);
         rssParameters.setCount(1);
         rssParameters.setImage(false);
         
