我最近才开始研究例外情况和使用它们的最佳实践,我想知道这样做的正确方法是什么:
假设有一个具有多个参数的方法。该方法有多个参数较少的重载,通过提供默认值来调用主实现。
我是否验证每个重载中的所有参数?
public string Translate(string text)
{
    if (String.IsNullOrEmpty(text))
        throw new ArgumentNullException();
    return Translate(text, "english");
}
public string Translate(string text, string language)
{
    if (String.IsNullOrEmpty(text))
        throw new ArgumentNullException();
    // Do the rest of the work
    // ...
}
我是否重新抛出异常?
public string Translate(string text)
{
    try
    {
        return Translate(text, "english");
    }
    catch
    {
        throw;
    }
}
public string Translate(string text, string language)
{
    if (String.IsNullOrEmpty(text))
        throw new ArgumentNullException();
    // Do the rest of the work
    // ...
}
还是我完全放弃异常并在重载中尝试/捕获块?
public string Translate(string text)
{
    return Translate(text, "english");
}
public string Translate(string text, string language)
{
    if (String.IsNullOrEmpty(text))
        throw new ArgumentNullException();
    // Do the rest of the work
    // ...
}
另外,这两种方法的文档会是什么样子?
(使用 C# XML 注释。尤其是我放置<exception>元素的地方。)
我确实意识到这是一个小话题,但是,每次遇到这种情况(实际上经常发生)时,我都会一直想知道。