Add exception handling feature