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

'Exception is not documented' on inherited documentation. #6

Open
Neonalig opened this issue Nov 26, 2021 · 2 comments
Open

'Exception is not documented' on inherited documentation. #6

Neonalig opened this issue Nov 26, 2021 · 2 comments
Labels
Analysing Analysing the issue bug Something isn't working

Comments

@Neonalig
Copy link

When creating a method which inherits documentation from a base, 'Exception is not documented' is given as a warning even if the base method provides documentation.

image
image

/// <summary>
/// Invokes the given action, and logs then throws an <see cref="Exception"/> if any occurs.
/// </summary>
/// <param name="Act">The action to invoke.</param>
/// <param name="MemberName">The name of the caller member, as provided by <see cref="CallerMemberNameAttribute"/>.</param>
/// <param name="FilePath">The name of the caller file path, as provided by <see cref="CallerFilePathAttribute"/>.</param>
/// <param name="LineNumber">The line number of where the exception occurred, as provided by <see cref="CallerLineNumberAttribute"/>.</param>
/// <exception cref="Exception">Thrown if the given <paramref name="Act"/> throws any exception.</exception>
public static void InvokeAndThrow( this Action Act, [CallerMemberName] string? MemberName = null, [CallerFilePath] string? FilePath = null, [CallerLineNumber] int? LineNumber = null ) {
    try {
        Act();
    } catch ( Exception Ex ) {
        LogException(Ex, MemberName, FilePath, LineNumber);
        throw;
    }
}

/// <inheritdoc cref="InvokeAndThrow(Action, string?, string?, int?)"/>
/// <typeparam name="T">The action value type.</typeparam>
public static void InvokeAndThrow<T>( this Action<T> Act, T Value, [CallerMemberName] string? MemberName = null, [CallerFilePath] string? FilePath = null, [CallerLineNumber] int? LineNumber = null ) {
    try {
        Act(Value);
    } catch ( Exception Ex ) {
        LogException(Ex, MemberName, FilePath, LineNumber);
        throw;
    }
}
@hhu-mahmoud
Copy link
Owner

@Neonalig I will try to fix it as soon as possible.

@hhu-mahmoud hhu-mahmoud added Analysing Analysing the issue bug Something isn't working labels Dec 1, 2021
@magol
Copy link

magol commented Apr 5, 2022

I also want that if I use <inheritdoc/>, I want it to be possible to select if I want to add the documentation to the inherited documentation or to the implemented method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysing Analysing the issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants