Edited Exception Handling and Stack pop