fixes #28 - Better info error when adding same path to media collection
This commit is contained in:
parent
df757416b7
commit
dad41a224f
|
@ -142,9 +142,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
DefaultRedirectPath = DefaultRedirectPath,
|
DefaultRedirectPath = DefaultRedirectPath,
|
||||||
|
|
||||||
// Tell SS to bubble exceptions up to here
|
// Tell SS to bubble exceptions up to here
|
||||||
WriteErrorsToResponse = false,
|
WriteErrorsToResponse = false
|
||||||
|
|
||||||
DebugMode = true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
container.Adapter = new ContainerAdapter(ApplicationHost);
|
container.Adapter = new ContainerAdapter(ApplicationHost);
|
||||||
|
@ -153,6 +151,21 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||||
Plugins.Add(new CorsFeature());
|
Plugins.Add(new CorsFeature());
|
||||||
|
|
||||||
ServiceStack.Logging.LogManager.LogFactory = new NLogFactory();
|
ServiceStack.Logging.LogManager.LogFactory = new NLogFactory();
|
||||||
|
|
||||||
|
ResponseFilters.Add((req, res, dto) =>
|
||||||
|
{
|
||||||
|
var exception = dto as Exception;
|
||||||
|
|
||||||
|
if (exception != null)
|
||||||
|
{
|
||||||
|
_logger.ErrorException("Error processing request", exception);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(exception.Message))
|
||||||
|
{
|
||||||
|
res.AddHeader("X-Application-Error-Code", exception.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -389,6 +389,8 @@ namespace MediaBrowser.Server.Implementations.ServerManager
|
||||||
{
|
{
|
||||||
if (UdpServer != null)
|
if (UdpServer != null)
|
||||||
{
|
{
|
||||||
|
_logger.Info("Disposing UdpServer");
|
||||||
|
|
||||||
UdpServer.MessageReceived -= UdpServer_MessageReceived;
|
UdpServer.MessageReceived -= UdpServer_MessageReceived;
|
||||||
UdpServer.Dispose();
|
UdpServer.Dispose();
|
||||||
}
|
}
|
||||||
|
@ -488,6 +490,7 @@ namespace MediaBrowser.Server.Implementations.ServerManager
|
||||||
{
|
{
|
||||||
if (ExternalWebSocketServer != null)
|
if (ExternalWebSocketServer != null)
|
||||||
{
|
{
|
||||||
|
_logger.Info("Disposing {0}", ExternalWebSocketServer.GetType().Name);
|
||||||
ExternalWebSocketServer.Dispose();
|
ExternalWebSocketServer.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user