Added exception handling and exception events.