diff --git a/include/class_IconTheme.inc b/include/class_IconTheme.inc
index 1d10ed5de0a223ecf339edc0c120f7f69c969209..c48df8da38d8f6ae9c1b6d36e7f3417819d247d3 100644
--- a/include/class_IconTheme.inc
+++ b/include/class_IconTheme.inc
@@ -83,7 +83,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 +186,8 @@ class IconTheme
             } else {
               $themes[$file] = new IconTheme("$path/$file", static::$default_theme);
             }
-          } catch (Exception $e) {
+          } catch (ThemeFileParsingException $e) {
+            continue;
           }
         }
       }
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 41ce9755076abb7f21f9caf80fc9cd688c0320de..c12693dcc3157fc5131d54793c1fcecf56bb93d0 100644
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
@@ -1135,7 +1135,7 @@ class LDAP
     foreach ($fileLines as $lineNumber => $fileLine) {
       if (preg_match('/^ /', $fileLine)) {
         if ($line === NULL) {
-          throw new Exception(sprintf(_('Error line %s, first line of an entry cannot start with a space'), $lineNumber));
+          throw new LDIFImportException(sprintf(_('Error line %s, first line of an entry cannot start with a space'), $lineNumber));
         }
         /* Append to current line */
         $line .= substr($fileLine, 1);
@@ -1153,19 +1153,19 @@ class LDAP
             $value = base64_decode(trim(substr($value, 1)));
           }
           if (preg_match('/^</', $value)) {
-            throw new Exception(sprintf(_('Error line %s, references to an external file are not supported'), $lineNumber));
+            throw new LDIFImportException(sprintf(_('Error line %s, references to an external file are not supported'), $lineNumber));
           }
           if ($value === '') {
-            throw new Exception(sprintf(_('Error line %s, attribute "%s" has no value'), $lineNumber, $key));
+            throw new LDIFImportException(sprintf(_('Error line %s, attribute "%s" has no value'), $lineNumber, $key));
           }
           if ($key == 'dn') {
             if (!empty($entry)) {
-              throw new Exception(sprintf(_('Error line %s, an entry bloc can only have one dn'), $lineNumber));
+              throw new LDIFImportException(sprintf(_('Error line %s, an entry bloc can only have one dn'), $lineNumber));
             }
             $entry['dn']  = $value;
             $entryStart   = $lineNumber;
           } elseif (empty($entry)) {
-            throw new Exception(sprintf(_('Error line %s, an entry bloc should start with the dn'), $lineNumber));
+            throw new LDIFImportException(sprintf(_('Error line %s, an entry bloc should start with the dn'), $lineNumber));
           } else {
             if (!isset($entry[$key])) {
               $entry[$key] = array();
@@ -1196,9 +1196,7 @@ class LDAP
 
       /* If we can't Import, return with a file error */
       if (!$this->import_single_entry($srp, $entry, $usemodify, $usermdir)) {
-        $error = sprintf(_("Error while importing dn: '%s', please check your LDIF from line %s on!"), $entry['dn'][0],
-                        $startLine);
-        throw new Exception($error);
+        throw new LDIFImportException(sprintf(_('Error while importing dn: "%s", please check your LDIF from line %s on!'), $entry['dn'][0], $startLine));
       }
     }
   }
diff --git a/include/class_objects.inc b/include/class_objects.inc
index 2c9e96ea58bf39e4ca6cf5176f96a21cbc55830d..e4dc00620618ea75fa91c7cd92fdc3ff4c3fcfc2 100644
--- a/include/class_objects.inc
+++ b/include/class_objects.inc
@@ -159,7 +159,7 @@ class objects
 
     $infos = static::infos($type);
     if (!isset($infos['management'])) {
-      throw new Exception('Asked for link for type "'.$type.'" but it does not have a management class');
+      throw new NoManagementClassException('Asked for link for type "'.$type.'" but it does not have a management class');
     }
     $pInfos = pluglist::pluginInfos($infos['management']);
     $index  = $pInfos['INDEX'];
@@ -179,7 +179,7 @@ class objects
           $text = $dn;
         }
       } else {
-        throw new Exception('Dn '.$dn.' not found in LDAP');
+        throw new NonExistingLdapNodeException('Dn '.$dn.' not found in LDAP');
       }
     } elseif (is_array($text)) {
       $text = $text[$infos['nameAttr']][0];