diff --git a/lib/SimpleSAML/Error/CannotSetCookie.php b/lib/SimpleSAML/Error/CannotSetCookie.php
index 65b6ee8e230fb3fe87a63e0aa1de491a2554a200..31a25b0c535bb1006856f8e6f6741f25aac16556 100644
--- a/lib/SimpleSAML/Error/CannotSetCookie.php
+++ b/lib/SimpleSAML/Error/CannotSetCookie.php
@@ -12,4 +12,25 @@ namespace SimpleSAML\Error;
 class CannotSetCookie extends \SimpleSAML_Error_Exception
 {
 
+    /**
+     * The exception was thrown for unknown reasons.
+     *
+     * @var int
+     */
+    const UNKNOWN = 0;
+
+    /**
+     * The exception was due to the HTTP headers being already sent, and therefore we cannot send additional headers to
+     * set the cookie.
+     *
+     * @var int
+     */
+    const HEADERS_SENT = 1;
+
+    /**
+     * The exception was due to trying to set a secure cookie over an insecure channel.
+     *
+     * @var int
+     */
+    const SECURE_COOKIE = 2;
 }