veged / xjst

Extensible JavaScript Transformations

Home Page:http://veged.github.com/xjst/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show context on no template exeption

veged opened this issue · comments

Right now:

$xjst
template(bla) return 'bla'
(function(exports) {
    function $e() {
        throw new Error;
        return;
    }
    exports.apply = apply;
    function apply() {
        if (!bla === false) {
            return "bla";
            return;
        } else {
            return $e.call(this);
        }
    }
    return exports;
})(typeof exports === "undefined" ? {} : exports);

It will be better if we throw error with current context (for debug purposes).

\cc @dosyara

Fixed.