diff --git a/include/class_IconTheme.inc b/include/class_IconTheme.inc
index 1d10ed5de0a223ecf339edc0c120f7f69c969209..c6834a4613debb35fadebef7be850313a85bc1af 100644
--- a/include/class_IconTheme.inc
+++ b/include/class_IconTheme.inc
@@ -18,6 +18,8 @@
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 */
 
+class ThemeFileParsingException extends Exception;
+
 class IconThemeDir
 {
   private $Size;
@@ -83,7 +85,7 @@ class IconTheme
     $this->path = $folder;
     $datas  = @parse_ini_file($folder.'/index.theme', TRUE, INI_SCANNER_RAW);
     if ($datas === FALSE) {
-      throw new Exception('Error while parsing theme file');
+      throw new ThemeFileParsingException('Error while parsing theme file');
     }
     if (isset($datas['Icon Theme']['Directories']) && !empty($datas['Icon Theme']['Directories'])) {
       $dirs   = preg_split('/,/', $datas['Icon Theme']['Directories']);
@@ -186,7 +188,8 @@ class IconTheme
             } else {
               $themes[$file] = new IconTheme("$path/$file", static::$default_theme);
             }
-          } catch (Exception $e) {
+          } catch (ThemeFileParsingException $e) {
+            continue;
           }
         }
       }