DuHarTapt
25-05-2009, 11:38
Se ho un metodo che potrebbe lanciare anche un'eccezione generica devo includerla nei commenti xml?
Es.
/// <summary>
/// Test
/// </summary>
/// <exception cref="MiaEccezione"></exception>
/// <exception cref="Exception"></exception>
public void miometodo()
{
try
{
altroMetodoChePuoGenerareEccezioni();
}
catch(MiaEccezione me;)
{
..fa qualcosa..
throw me;
}
catch(Exception e)
{
..fa qualcosa..
throw e;
}
}
Il commento a questo metodo è corretto?
Es.
/// <summary>
/// Test
/// </summary>
/// <exception cref="MiaEccezione"></exception>
/// <exception cref="Exception"></exception>
public void miometodo()
{
try
{
altroMetodoChePuoGenerareEccezioni();
}
catch(MiaEccezione me;)
{
..fa qualcosa..
throw me;
}
catch(Exception e)
{
..fa qualcosa..
throw e;
}
}
Il commento a questo metodo è corretto?