add better exception handling for share commands. #468