mirror of
https://github.com/sochix/TLSharp.git
synced 2026-03-20 20:25:32 +01:00
Always include an innerException when re-throwing
Hiding the previous thrown exception is a bad practice.
This commit is contained in:
parent
c644bac4e4
commit
3639ae3e88
|
|
@ -49,9 +49,10 @@ namespace TLSharp.Tests
|
||||||
{
|
{
|
||||||
return new TelegramClient(ApiId, ApiHash);
|
return new TelegramClient(ApiId, ApiHash);
|
||||||
}
|
}
|
||||||
catch (MissingApiConfigurationException)
|
catch (MissingApiConfigurationException ex)
|
||||||
{
|
{
|
||||||
throw new Exception($"Please add your API settings to the `app.config` file. (More info: {MissingApiConfigurationException.InfoUrl})");
|
throw new Exception($"Please add your API settings to the `app.config` file. (More info: {MissingApiConfigurationException.InfoUrl})",
|
||||||
|
ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ namespace TeleSharp.TL
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
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)))
|
if (t.IsSubclassOf(typeof(TLMethod)))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue