Browse Source

[fix]将BaseException的信息放到ErrorMessage中

master
贾荣国 3 years ago
parent
commit
af76d7a590
  1. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs
  2. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs
  3. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs
  4. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs
  5. 3
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs
  6. 5
      WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiAppService.cs

3
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Parts/PartAppService.cs

@ -77,8 +77,9 @@ namespace Win_in.Sfs.Scp.WebApi
}
catch (Exception ex)
{
var baseEx = ex.GetBaseException();
entity.ErrorCode = 1;
entity.ErrorMessage = ex.Message;
entity.ErrorMessage = baseEx.Message;
}
var ret = await _partRepository.InsertAsync(entity);

3
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/PurchaseOrders/PurchaseOrderAppService.cs

@ -81,8 +81,9 @@ namespace Win_in.Sfs.Scp.WebApi
}
catch (Exception ex)
{
var baseEx = ex.GetBaseException();
entity.ErrorCode = 1;
entity.ErrorMessage = ex.Message;
entity.ErrorMessage = baseEx.Message;
}
var ret = await _purchaseOrderRepository.InsertAsync(entity);
var dto = ObjectMapper.Map<PurchaseOrder, PurchaseOrderDTO>(ret);

3
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Receipts/ReceiptAppService.cs

@ -80,8 +80,9 @@ namespace Win_in.Sfs.Scp.WebApi
}
catch (Exception ex)
{
var baseEx = ex.GetBaseException();
entity.ErrorCode = 1;
entity.ErrorMessage = ex.Message;
entity.ErrorMessage = baseEx.Message;
}
var ret = await _receiptRepository.InsertAsync(entity);

3
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/Suppliers/SuppliersAppService.cs

@ -76,8 +76,9 @@ namespace Win_in.Sfs.Scp.WebApi
}
catch (Exception ex)
{
var baseEx = ex.GetBaseException();
entity.ErrorCode = 1;
entity.ErrorMessage = ex.Message;
entity.ErrorMessage = baseEx.Message;
}
var ret = await _supplierRepository.InsertAsync(entity);

3
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/UnplannedReceipts/UnplannedReceiptAppService.cs

@ -79,8 +79,9 @@ namespace Win_in.Sfs.Scp.WebApi
}
catch (Exception ex)
{
var baseEx = ex.GetBaseException();
entity.ErrorCode = 1;
entity.ErrorMessage = ex.Message;
entity.ErrorMessage = baseEx.Message;
}

5
WebApiService/src/Win_in.Sfs.Scp.WebApi.Application/WebApiAppService.cs

@ -15,4 +15,9 @@ namespace Win_in.Sfs.Scp.WebApi
LocalizationResource = typeof(WebApiResource);
}
}
public static class ExceptionExtension
{
}
}

Loading…
Cancel
Save