/** * @param StockInterface $stock * @return StockInterface * @throws CouldNotSaveException */ public function save(StockInterface $stock) { try { $this->resource->save($stock); } catch (\Exception $exception) { throw new CouldNotSaveException(__('Unable to save Stock'), $exception); } return $stock; }
/** * @param StockInterface $stock * @return StockInterface * @throws CouldNotSaveException */ public function save(StockInterface $stock) { try { $this->resource->save($stock); } catch (\Exception $exception) { throw new CouldNotSaveException(__($exception->getMessage())); } return $stock; }