Adds custom exceptions.