Skip to content

Commit

Permalink
Fixes "guarded at" stack trace position in V8.
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiaszCudnik committed Mar 11, 2012
1 parent 936a20c commit 17111de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/contracts.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ opt = (k) ->
getModName = (isServer) ->
st = printStackTrace(e: new Error())
# in the stacktrace the frame above this one is where we were guarded/used
guardedAt = st[2]
guardedAt = if st[0] is 'Error' then st[3] else st[2]
# pull out the filename (which will become our module) and line
# number (the location in the module where the guard/use occured)
# stack traces look like: {anonymous}()@file:///Path/to/file.js:4242
Expand Down

0 comments on commit 17111de

Please sign in to comment.