stop throwing new exceptions instead of just rethrow

This commit is contained in:
Jamie Rees 2019-04-04 21:30:28 +01:00
parent 24bb0207d5
commit 4baff16d07

View file

@ -13,8 +13,6 @@ namespace Ombi.Helpers
{ {
throw new ApplicationSettingsException("The URI is null, please check your settings to make sure you have configured the applications correctly."); throw new ApplicationSettingsException("The URI is null, please check your settings to make sure you have configured the applications correctly.");
} }
try
{
var uri = new UriBuilder(); var uri = new UriBuilder();
if (val.StartsWith("http://", StringComparison.Ordinal)) if (val.StartsWith("http://", StringComparison.Ordinal))
@ -42,11 +40,6 @@ namespace Ombi.Helpers
return uri.Uri; return uri.Uri;
} }
catch (Exception exception)
{
throw new Exception(exception.Message, exception);
}
}
/// <summary> /// <summary>
/// Returns the URI. /// Returns the URI.
@ -64,8 +57,6 @@ namespace Ombi.Helpers
{ {
throw new ApplicationSettingsException("The URI is null, please check your settings to make sure you have configured the applications correctly."); throw new ApplicationSettingsException("The URI is null, please check your settings to make sure you have configured the applications correctly.");
} }
try
{
var uri = new UriBuilder(); var uri = new UriBuilder();
if (val.StartsWith("http://", StringComparison.Ordinal)) if (val.StartsWith("http://", StringComparison.Ordinal))
@ -91,11 +82,6 @@ namespace Ombi.Helpers
return uri.Uri; return uri.Uri;
} }
catch (Exception exception)
{
throw new Exception(exception.Message, exception);
}
}
public static Uri ReturnUriWithSubDir(this string val, int port, bool ssl, string subDir) public static Uri ReturnUriWithSubDir(this string val, int port, bool ssl, string subDir)
{ {