Skip to content

Commit

Permalink
More error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ktaeyln committed Dec 3, 2017
1 parent 99ded28 commit 58e003c
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 22 deletions.
2 changes: 1 addition & 1 deletion lib/Instructions/Bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/Bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/Bundle.ts
Expand Up @@ -10,7 +10,7 @@ export class Bundle implements Instruction {
generateSource(): string {
var source = "";
this.bundle.forEach(function(instruction) {
source += instruction.generateSource(undefined);
source += instruction.generateSource(undefined, false);
})
return source;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Instructions/EndIf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/EndIf.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/Instructions/EndIf.ts
Expand Up @@ -8,8 +8,8 @@ export class EndIf implements Instruction {

generateSource(stackControl: StackControl, asyncContext: boolean): string {
if (stackControl.pop({omitcb:true})['else'] || !asyncContext)
return "}";
return "}else{__next()}"
return "}}catch(e){__out.write(__error(e))}";
return "}else{__next()}}catch(e){__out.write(__error(e));__next()}"
}

}
2 changes: 1 addition & 1 deletion lib/Instructions/Exec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/Exec.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/Exec.ts
Expand Up @@ -16,7 +16,7 @@ export class Exec implements Instruction {
}

generateSource(): string {
return "try{" + this._source + ";}catch(e){__out.write(__error(e));};";
return "try{" + this._source + "}catch(e){__out.write(__error(e))}";
}

}
2 changes: 1 addition & 1 deletion lib/Instructions/If.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/If.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Instructions/If.ts
Expand Up @@ -19,7 +19,7 @@ export class If implements Instruction {

generateSource(stackControl: {push: Function, pop: Function}): string {
stackControl.push();
return "if (" + this._condition + ") {";
return "try{if(" + this._condition + "){";
}

}
10 changes: 7 additions & 3 deletions lib/Template.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 58e003c

Please sign in to comment.