mirror of
https://github.com/S2-/ejs-render-remote
synced 2025-08-02 12:40:04 +02:00
use $.readyException
This commit is contained in:
@@ -28,8 +28,7 @@
|
|||||||
try {
|
try {
|
||||||
return templateFn(data);
|
return templateFn(data);
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
console.error(ex);
|
$.readyException(ex);
|
||||||
throw ex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { //if the template is not cached, we need to get it and render it later once we have it. remember: this happens only if the template is not already cached
|
} else { //if the template is not cached, we need to get it and render it later once we have it. remember: this happens only if the template is not already cached
|
||||||
@@ -52,7 +51,7 @@
|
|||||||
templateOptions
|
templateOptions
|
||||||
));
|
));
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
console.error(templateUrl, ex);
|
$.readyException(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
//clean up the getFnFor
|
//clean up the getFnFor
|
||||||
@@ -80,9 +79,8 @@
|
|||||||
ejs.cache.set(templateUrl, templateFn);
|
ejs.cache.set(templateUrl, templateFn);
|
||||||
d.resolve(templateUrl);
|
d.resolve(templateUrl);
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
console.error(templateUrl, ex);
|
$.readyException(ex);
|
||||||
d.reject(ex);
|
d.reject(ex);
|
||||||
throw ex;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user