mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
stop throwing new exceptions instead of just rethrow
This commit is contained in:
parent
24bb0207d5
commit
4baff16d07
1 changed files with 45 additions and 59 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue