Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: try catch runtime function call error #56

Merged
merged 1 commit into from
Jan 29, 2015
Merged

Conversation

dead-horse
Copy link
Member

expect(function () {
      var tpl = '{{obj.error}}\n{{obj.error()}}';
      new XTemplate(tpl).render({
        obj: {
          error: error
        }
      });
    }).to.throwException(function (e) {
    expect(e.message).to.match(/Execute function `obj.error` Error: mock error/);
    expect(e.message).to.match(/line 2/);
  });

@yiminghe
Copy link
Member

没测试用例...

@dead-horse
Copy link
Member Author

@yiminghe 加上了

@dead-horse
Copy link
Member Author

ping @yiminghe

yiminghe added a commit that referenced this pull request Jan 29, 2015
fix: try catch runtime function call error
@yiminghe yiminghe merged commit 4d3f65e into master Jan 29, 2015
yiminghe added a commit that referenced this pull request Jan 29, 2015
@yiminghe yiminghe added this to the 4.1.2 milestone Jan 29, 2015
@dead-horse dead-horse deleted the runtime-fn-error branch January 29, 2015 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants