0
이것은 다른 게시물과 관련이 있습니다.MVC - 예외를 throw하지만 목록에서 값을 반환해야한다고 말하는 메시지를 내 보냅니다.
public IEnumerable<DrillFormat> List(string partitionKey)
{
try {
_drillServiceContext.MergeOption = MergeOption.NoTracking; // set when you will not be updating this entity
var results = from c in
_drillServiceContext.drillTable
where c.PartitionKey == partitionKey
select c;
var query = results.AsTableServiceQuery();
var queryResults = query.Execute();
return queryResults;
} catch (Exception e) {
System.Diagnostics.Trace.TraceInformation(e.Message
+ Environment.NewLine + e.StackTrace);
throw new Exception("Error while accessing the data store.", e);
}
}
을하지만 지금은 "모든 코드 경로가 값을 반환"을 알리는 메시지가 : 그래서 나는 다음과 같은 코드 일부 예외 로직을 추가하려합니다. 그것은 예외를 던지더라도 값을 반환해야한다는 것을 의미합니까?