throw new DkException(new DkExceptionContext(DkException.UNKNWOWN_ERROR_MESSAGE), e);
}
protected void populateException(final DkException exception)
{
final DkExceptionContext context = exception.getContext();
if (context.getCreationDate() == null)
{
context.setCreationDate(new Date().toString());
}
if (context.getRequest() == null)
{
final StringBuffer requestURL = getRequest().getRequestURL();
if (getRequest().getQueryString() != null)
{
requestURL.append("?").append(getRequest().getQueryString());
}
final String completeURL = requestURL.toString();
context.setRequest(completeURL);
}
if (context.getLanguageIsoCode() == null)
{
context.setLanguageIsoCode(getLanguageIsoCode());
}
if (context.getUserLogged() == null)
{
context.setUserLogged(getUserLogged());
}
context.buildStackTrace(exception);
}