public ExportStockReportResult ExportStockReport()
 {
     try
     {
         byte[] fileData = _ecommerceSettings.WarehouseStockEnabled
             ? _getStockExportData.GetWarehousedExport()
             : _getStockExportData.GetStandardExport();
         return(new ExportStockReportResult
         {
             FileResult = GetStockFileResult(fileData),
             Success = true
         });
     }
     catch (Exception exception)
     {
         CurrentRequestData.ErrorSignal.Raise(exception);
         return(new ExportStockReportResult
         {
             Message =
                 _stringResourceProvider.GetValue("Export Stock Report Failed",
                                                  "Stock Report exporting has failed. Please try again and contact system administration if an error continues to appear.")
         });
     }
 }