LOG.debug("Transformed result is \n" + os.toString());
return transformed;
} catch (TransformerConfigurationException e) {
- throw new RuntimeException(e.getMessage(), e);
+ throw new TransformerException("Transformer configuration problem", e);
} finally {
// Release the connection.
aMethod.releaseConnection();
try {
return executeMethod(aClient, method);
} catch (TransformerException e) {
- throw new PageException(e.getMessage(), e);
+ throw new PageException("Transformation problem for url " + aUrl, e);
} catch (IOException e) {
- throw new PageException(e.getMessage(), e);
+ throw new PageException("Problem getting " + aUrl, e);
}
}
try {
return executeMethod(aClient, method);
} catch (TransformerException e) {
- throw new PageException(e.getMessage(), e);
+ throw new PageException("Transformation problem for url " + aUrl, e);
} catch (IOException e) {
- throw new PageException(e.getMessage(), e);
+ throw new PageException("Problem getting page " + aUrl, e);
}
}
/*
+ *
* Copyright 2005 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* @param aException Exception that caused the problem.
*/
public void addMessage(String aMessage, Exception aException) {
- _messages.add(aMessage + ": " + aException.getMessage());
+ String msg = aMessage;
+ for (Throwable e = aException; e != null; e = e.getCause()) {
+ msg += ": " + e.getMessage();
+ }
+ addMessage(msg);
}
/**