public virtual void Write(Template code, string fileName)
{
try
{
Stopwatch stopwatch = Stopwatch.StartNew();
using (TextWriter w = tool.GetOutputFileWriter(g, fileName))
{
ITemplateWriter wr = new AutoIndentWriter(w);
wr.LineWidth = lineWidth;
code.Write(wr);
}
stopwatch.Stop();
}
catch (IOException ioe)
{
tool.errMgr.ToolError(ErrorType.CANNOT_WRITE_FILE,
ioe,
fileName);
}
}