diff --git a/modules/saml/lib/Error.php b/modules/saml/lib/Error.php
index 22a031db45c08e7d6239f5a2242f8baf06d533ac..b51c93bac4d6cf092795240170b3894dd3b89582 100644
--- a/modules/saml/lib/Error.php
+++ b/modules/saml/lib/Error.php
@@ -145,13 +145,6 @@ class sspmod_saml_Error extends SimpleSAML_Error_Exception {
 	 * @return SimpleSAML_Error_Exception  An exception representing this error.
 	 */
 	public function toException() {
-
-		if ($this->statusMessage !== NULL) {
-			$msg = $this->statusMessage;
-		} else {
-			$msg = '';
-		}
-
 		$e = NULL;
 
 		switch ($this->status) {