pw.flush();
sw.flush();
return sw.toString();
} catch (IOException e) {
String message = ConfluenceActionSupport.getTextStatic(COULD_NOT_FETCH_URL_CONTENTS_ERROR_KEY, new String[]{gistUrl, e.getMessage()});
throw new MacroException(message, e);
} finally {
Closeables.closeQuietly(pw);
Closeables.closeQuietly(sw);
Closeables.closeQuietly(in);
}