mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-02 12:40:04 +02:00
when compile throws an exception, log it to the console
This commit is contained in:
@@ -66,7 +66,13 @@
|
||||
$.get(templateUrl)
|
||||
.then(function(template) {
|
||||
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
||||
try {
|
||||
var templateFn = ejs.compile(template, templateOptions);
|
||||
} catch(ex) {
|
||||
console.error(templateUrl, ex);
|
||||
d.reject(ex);
|
||||
throw ex;
|
||||
}
|
||||
ejs.cache.set(templateUrl, templateFn);
|
||||
|
||||
d.resolve(templateUrl);
|
||||
|
Reference in New Issue
Block a user