From f99997cf5f7818a613d3fe680d22936cb77fc3ee Mon Sep 17 00:00:00 2001 From: Tobiasz Cudnik Date: Sun, 11 Mar 2012 22:56:26 +0100 Subject: [PATCH] Added stack trace to optional argument error. (cherry picked from commit 833c657) --- src/contracts.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/contracts.coffee b/src/contracts.coffee index ce951fb..7ed1d7d 100644 --- a/src/contracts.coffee +++ b/src/contracts.coffee @@ -256,7 +256,8 @@ fun = (dom, rng, options) -> true else if prevWasOpt - throw new Error "Illagal arguments: required argument following an optional argument." + throw new Error "Illagal arguments: required argument following an" + + "optional argument. #{curr}" else false ), false