Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inheritdoc with exception bug #120

Open
Hulkstance opened this issue Mar 14, 2021 · 0 comments
Open

Inheritdoc with exception bug #120

Hulkstance opened this issue Mar 14, 2021 · 0 comments

Comments

@Hulkstance
Copy link

I'm getting a warning which says that an exception is not documented whereas it was documented in its parent. I mean I'm using inheritdoc.

image

public interface IBotClient : IDisposable
{
	/// <summary>
	/// Pings to see if the server is reachable.
	/// </summary>
	/// <param name="ct">CancellationToken.</param>
	/// <returns>The roundtrip time of the ping request.</returns>
	/// <exception cref="T:System.ObjectDisposedException">Throw if disposed.</exception>
	/// <exception cref="T:ElonMuskBot.Core.Exceptions.RequestFailedException">Throw if request failed.</exception>
	Task<long> PingAsync(CancellationToken ct = default);
}

/// <summary>
///     Abstract base class for implementations of the <see cref="IBotClient" />.
/// </summary>
public abstract class BotClientBase : IBotClient
{
	private bool _disposed;
	private readonly ILogger<BotClientBase> _logger;
	private readonly IBinanceClient _client;
	private readonly IBinanceSocketClient _socketClient;

	protected BotClientBase(ILogger<BotClientBase> logger, IBinanceClient client, IBinanceSocketClient socketClient)
	{
		_logger = logger;
		_client = client;
		_socketClient = socketClient;
	}

	/// <inheritdoc />
	public async Task<long> PingAsync(CancellationToken ct = default)
	{
		ThrowIfDisposed();

		var result = await _client.PingAsync(ct).ConfigureAwait(false);

		if (result.Success) return result.Data;

		throw new RequestFailedException(
			$"Error while sending a ping to the server | Error code: {result.Error?.Code} | Error message: {result.Error?.Message}");
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant