Mercurial > pub > ImplabJs
comparison src/implab/safe.js @ 13:3d4abbce4afc
fixed safe.async function
author | cin |
---|---|
date | Fri, 08 Sep 2017 13:44:45 +0300 |
parents | f0035923ff3e |
children | 8332e287d552 |
comparison
equal
deleted
inserted
replaced
10:8705103f074f | 13:3d4abbce4afc |
---|---|
173 } | 173 } |
174 }; | 174 }; |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 return /** @this */ function () { | 178 try { |
179 try { | 179 return wrapresult(fn.apply(thisArg, arguments)); |
180 return wrapresult(fn.apply(this, arguments)); | 180 } catch (e) { |
181 } catch (e) { | 181 return wrapresult(null, e); |
182 return wrapresult(null, e); | |
183 } | |
184 }; | 182 }; |
185 }, | 183 }, |
186 | 184 |
187 create: function () { | 185 create: function () { |
188 if (console && console.warn) | 186 if (console && console.warn) |