Skip to content

Commit

Permalink
fix error message&example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhao28 committed Jun 12, 2015
1 parent 0a39f40 commit 6a8adf1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ mydebugger.stopConditions = {
// so that debugger only stops at a statement of a new position
// or you can add your own condition, i.e. stops at line 10
mydebugger.conditions["line10"] = function (prevNode, nextNode) {
if (nextNode.reportedLine === 10)
if (nextNode.sLine=== 10)
// disable itself so that it only triggers once on line 10
mydebugger.stopConditions["line10"] = false
return true;
Expand Down
4 changes: 2 additions & 2 deletions lib/rt.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,8 @@ CRuntime.prototype.raiseException = function(message) {
var col, interp, ln, ref, ref1;
interp = this.interp;
if (interp) {
ln = ((ref = interp.currentNode) != null ? ref.line : void 0) || "unknown";
col = ((ref1 = interp.currentNode) != null ? ref1.column : void 0) || "unknown";
ln = ((ref = interp.currentNode) != null ? ref.sLine : void 0) || "unknown";
col = ((ref1 = interp.currentNode) != null ? ref1.sColumn : void 0) || "unknown";
throw ln + ":" + col + " " + message;
} else {
throw message;
Expand Down
4 changes: 2 additions & 2 deletions src/rt.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,8 @@ CRuntime::defaultValue = (type) ->
CRuntime::raiseException = (message) ->
interp = @interp
if interp
ln = interp.currentNode?.line or "unknown"
col = interp.currentNode?.column or "unknown"
ln = interp.currentNode?.sLine or "unknown"
col = interp.currentNode?.sColumn or "unknown"
throw ln + ":" + col + " " + message
else
throw message
Expand Down

0 comments on commit 6a8adf1

Please sign in to comment.