add exception handling feature