Used Yami's and Tycoonie's fork, finally optimised exceptions