Closed bekzod closed 6 years ago
here is benchmark comparing try...catch
https://jsperf.com/try-catch-overhead
Either way is good i think you can close if you want
On 19 Jan 2018, at 01:00, Stefan Penner notifications@github.com wrote:
@stefanpenner commented on this pull request.
In lib/index.ts:
this.begin();
- if (onError) {
- try {
- return method.apply(target, args);
- } catch (error) {
- try {
- return method.apply(target, args);
- } catch (error) { @bekzod thoughts?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
try {} catch() finally {}
andtry {} catch()
should probably perform equally (will try to add benchmarks for it) therefore it is better just usetry {} catch() finally {}