Permalink
Browse files

Merge pull request #12 from visionmedia/patch-1

Throw Errors
  • Loading branch information...
2 parents 3bc78b7 + f1b35e9 commit dd1adf184131ec11e05ab7de4738bc12aca9bf0c @jed jed committed May 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/cookies.js
View
@@ -46,7 +46,7 @@ Cookies.prototype = {
if (typeof headers == "string") headers = [headers]
- if (!secure && opts && opts.secure) throw "Cannot send secure cookie over unencrypted socket"
+ if (!secure && opts && opts.secure) throw new Error("Cannot send secure cookie over unencrypted socket")
cookie.secure = secure
if (opts && "secure" in opts) cookie.secure = opts.secure

0 comments on commit dd1adf1

Please sign in to comment.