Always include an innerException when re-throwing

Hiding the previous thrown exception is a bad practice.
This commit is contained in:
Andres G. Aragoneses 2016-10-24 14:58:04 +08:00
parent c644bac4e4
commit 3639ae3e88
2 changed files with 4 additions and 3 deletions

View file

@ -21,7 +21,7 @@ namespace TeleSharp.TL
}
catch(Exception ex)
{
throw new InvalidDataException("Constructor Invalid Or Context.Init Not Called !");
throw new InvalidDataException("Constructor Invalid Or Context.Init Not Called !", ex);
}
if (t.IsSubclassOf(typeof(TLMethod)))
{