diff --git a/lib/SimpleSAML/Database.php b/lib/SimpleSAML/Database.php
index 5889a17fa0ffa727d5410374f6c539eef78bc432..818ec2fe5f45d967c3ab6b6fdeb5289f53929b54 100644
--- a/lib/SimpleSAML/Database.php
+++ b/lib/SimpleSAML/Database.php
@@ -126,7 +126,7 @@ class Database {
 
 			return $db;
 		} catch(PDOException $e){
-			throw new DBException("Database error: ". $e->getMessage());
+			throw new Exception("Database error: ". $e->getMessage());
 		}
 	}
 
@@ -187,7 +187,7 @@ class Database {
 
 			return $query;
 		} catch (PDOException $e){
-			throw new DBException("Database error: ". $e->getMessage());
+			throw new Exception("Database error: ". $e->getMessage());
 		}
 	}
 
@@ -210,7 +210,7 @@ class Database {
 
 			return $query;
 		} catch (PDOException $e){
-			throw new DBException("Database error: ". $e->getMessage());
+			throw new Exception("Database error: ". $e->getMessage());
 		}
 	}