Update exception handling on the library