veged / xjst

Extensible JavaScript Transformations
http://veged.github.com/xjst/
203 stars 19 forks source link

Show context on no template exeption #25

Closed veged closed 11 years ago

veged commented 11 years ago

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

indutny commented 11 years ago

Fixed.