mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-02 04:30:04 +02:00
log async ejs compile error to console
This commit is contained in:
@@ -40,11 +40,15 @@
|
||||
getTemplateFn.then(function(template) {
|
||||
var templateOptions = overwriteWithCacheOptions(options, templateUrl);
|
||||
|
||||
$('#' + r).replaceWith(ejs.render(
|
||||
template,
|
||||
data,
|
||||
templateOptions
|
||||
));
|
||||
try {
|
||||
$('#' + r).replaceWith(ejs.render(
|
||||
template,
|
||||
data,
|
||||
templateOptions
|
||||
));
|
||||
} catch(ex) {
|
||||
console.error(templateUrl, ex);
|
||||
}
|
||||
|
||||
//clean up the getFnFor
|
||||
if (ejs.cache.remove && ejs.cache.get('getFnFor' + templateUrl)) {
|
||||
|
@@ -1 +1 @@
|
||||
Hello <%= name%>!
|
||||
Hello <%= name %>!
|
||||
|
Reference in New Issue
Block a user