Catch Decorators? How about this??

So this guy is all like…

And I’m all like, why not…


I guess I was the only one that thought it was funny :pensive:

I actually have no idea what I’m looking at here. Maybe…just maybe…I should probably know more about decorators haha.


The short version is that decorators are functions that get called to wrap definitions and return new definitions. So something like this:

myMethod() {
    // ...

is basically the same as this

myMethod = MyDecorator(function myMethod () {
    // ...

This guy is making a decorator to create try…catch handlers for functions, apparently at the expense of losing all scope and context for riding the decorator train. My joke was, why stop at ripping try…catch out of the function? Why not put the whole function in a decorator? :stuck_out_tongue:

1 Like