Error handling redesigned