Improved error handling in StockAddActivity.