From dfcf1a4b6fdf5d7dcaf9bcd0b488c83918269e15 Mon Sep 17 00:00:00 2001 From: s2 Date: Sat, 8 Feb 2020 18:22:16 +0100 Subject: [PATCH] use $.readyException --- ejs-render-remote.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ejs-render-remote.js b/ejs-render-remote.js index 6a4fe83..2bc02d1 100644 --- a/ejs-render-remote.js +++ b/ejs-render-remote.js @@ -28,8 +28,7 @@ try { return templateFn(data); } catch(ex) { - console.error(ex); - throw ex; + $.readyException(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 @@ -52,7 +51,7 @@ templateOptions )); } catch(ex) { - console.error(templateUrl, ex); + $.readyException(ex); } //clean up the getFnFor @@ -80,9 +79,8 @@ ejs.cache.set(templateUrl, templateFn); d.resolve(templateUrl); } catch(ex) { - console.error(templateUrl, ex); + $.readyException(ex); d.reject(ex); - throw ex; } }); }