Skip to content
Snippets Groups Projects
Commit 0c660fda authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Add error codes to the SimpleSAML\Error\CannotSetCookie exception.

This way we can discern why we couldn't set a cookie, and act accordingly.
parent bcd0ae9b
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment