please make it a private method rather than a closure which need to be recreated by PHP for each call to ``renderException``