handling of unexpected exception