mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
improve logging
This commit is contained in:
@@ -533,14 +533,26 @@ public class RepositoryResource
|
|||||||
}
|
}
|
||||||
catch (PathNotFoundException ex)
|
catch (PathNotFoundException ex)
|
||||||
{
|
{
|
||||||
|
if (logger.isWarnEnabled())
|
||||||
|
{
|
||||||
|
logger.warn("could not find path {}", ex.getPath());
|
||||||
|
}
|
||||||
|
|
||||||
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
||||||
}
|
}
|
||||||
catch (RevisionNotFoundException ex)
|
catch (RevisionNotFoundException ex)
|
||||||
{
|
{
|
||||||
|
if (logger.isWarnEnabled())
|
||||||
|
{
|
||||||
|
logger.warn("could not find revision {}", ex.getRevision());
|
||||||
|
}
|
||||||
|
|
||||||
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
throw new WebApplicationException(Response.Status.NOT_FOUND);
|
||||||
}
|
}
|
||||||
catch (RepositoryException ex)
|
catch (RepositoryException ex)
|
||||||
{
|
{
|
||||||
|
logger.error("could not write content to page", ex);
|
||||||
|
|
||||||
throw new WebApplicationException(
|
throw new WebApplicationException(
|
||||||
ex, Response.Status.INTERNAL_SERVER_ERROR);
|
ex, Response.Status.INTERNAL_SERVER_ERROR);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user