[Wheat-cvs] r1/wheat renderlibrary.cpp,1.9,1.10
Status: Pre-Alpha
Brought to you by:
mark_lentczner
From: Jim K. <ki...@us...> - 2005-04-29 21:10:03
|
Update of /cvsroot/wheat/r1/wheat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6258/wheat Modified Files: renderlibrary.cpp Log Message: Fix xmlencoding bug in renderlibrary. Traces now know about errors. A few renames and cleanups. Index: renderlibrary.cpp =================================================================== RCS file: /cvsroot/wheat/r1/wheat/renderlibrary.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- renderlibrary.cpp 8 Apr 2005 18:25:12 -0000 1.9 +++ renderlibrary.cpp 29 Apr 2005 21:09:53 -0000 1.10 @@ -262,11 +262,11 @@ default: ; } } - + rawTrace.send("add", False()); } - void + static void buildRawTrace(tt::Trace& trace, Local& rawTrace) { rawTrace = Array(); @@ -306,6 +306,7 @@ resultStream.open(); bool doTrace = traceArg.isBool() && traceArg.asBool(); + Local rawTrace(f); pt::string errors; @@ -325,16 +326,22 @@ else t.expand(ctx); } - if (doTrace) { - Local rawTrace(f); buildRawTrace(t.trace(), rawTrace); - return rawTrace; } } catch (const char* s) { errors += s; } catch (const pt::string& s) { errors += s; } + if (doTrace) { + if (!pt::isempty(errors)) { + rawTrace.send("add", String("errors")); // name + rawTrace.send("add", String("errors")); // actionStr + rawTrace.send("add", String(errors)); + } + return rawTrace; + } + sourceStream->close(); if (!pt::isempty(errors)) { @@ -345,7 +352,7 @@ "<hr />\n" "<pre>\n" ); - resultStream.put(errors); + resultStream.put(tt::xmlencode(errors)); resultStream.put("</pre>\n"); } |