C
C#2y ago
Indeed

✅ XML docs not all exceptions included

Hi! It appears not all exceptions are included in xml docs Is there a way to go about it?
namespace WPFWeather.Services.WeatherProvider;
public interface IWeatherProvider {
/// <summary>
/// Fetches WeatherData for the given location
/// </summary>
/// <param name="location"></param>
/// <param name="from"></param>
/// <param name="to"></param>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
/// <exception cref="System.Net.HttpRequestException"></exception> //not included
public Task<IEnumerable<WeatherData>> GetWeatherAsync(Location location, DateTime from, DateTime to);
}
namespace WPFWeather.Services.WeatherProvider;
public interface IWeatherProvider {
/// <summary>
/// Fetches WeatherData for the given location
/// </summary>
/// <param name="location"></param>
/// <param name="from"></param>
/// <param name="to"></param>
/// <returns></returns>
/// <exception cref="ArgumentException"></exception>
/// <exception cref="System.Net.HttpRequestException"></exception> //not included
public Task<IEnumerable<WeatherData>> GetWeatherAsync(Location location, DateTime from, DateTime to);
}
5 Replies
Shinyshark
Shinyshark2y ago
What do you mean when you say "not all exceptions are included in xml docs"? Is the HttpRequestException not available?
Indeed
IndeedOP2y ago
nope
Shinyshark
Shinyshark2y ago
What if you use System.Net.Http.HttpRequestException?
Indeed
IndeedOP2y ago
yup, works Oddly enough when I've had it thrown from httpClient it went from System.Net unless im misremembering but ive also tried HttpRequestException and it didnt show me a need for using statement requirement since i didnt have to specify ArgException since ive already have using system well another quirk of compiler ig Thank you for your help ❤️
Shinyshark
Shinyshark2y ago
No ShinySmile
Want results from more Discord servers?
Add your server