Skip to content

Commit f99997c

Browse files
committed
Added stack trace to optional argument error. (cherry picked from commit 833c657)
1 parent 9bbfeea commit f99997c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/contracts.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ fun = (dom, rng, options) ->
256256
true
257257
else
258258
if prevWasOpt
259-
throw new Error "Illagal arguments: required argument following an optional argument."
259+
throw new Error "Illagal arguments: required argument following an" +
260+
"optional argument. #{curr}"
260261
else
261262
false
262263
), false

0 commit comments

Comments
 (0)