FatalException fatal = new FatalException(MessageFactory.createStaticMessage("Some fatal exception"),
new IOException("Some IO exception"));
BusinessException business = new BusinessException("Some business exception");
ExceptionBean bean = new ExceptionBean(exception);
String xml = (String)trans.transform(bean);
FileUtils.stringToFile(targetDir + "DefaultMuleException.xml", xml);
bean = new ExceptionBean(fatal);
xml = (String)trans.transform(bean);
FileUtils.stringToFile(targetDir + "FatalException.xml", xml);