diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php
index 77159f3d7f713ea8c3a72ff0cd6c8135a6cba90e..33faec23514e2b7a4115dc98e6496a4a9ef2f716 100644
--- a/lib/SimpleSAML/XHTML/IdPDisco.php
+++ b/lib/SimpleSAML/XHTML/IdPDisco.php
@@ -583,7 +583,7 @@ class IdPDisco
                 $templateFile = 'selectidp-links.php';
                 break;
             default:
-                throw new Exception('Invalid value for the \'idpdisco.layout\' option.');
+                throw new \Exception('Invalid value for the \'idpdisco.layout\' option.');
         }
 
         $t = new Template($this->config, $templateFile, 'disco');