Create generic exception handler decorator