--- parser3/src/main/Attic/pa_wcontext.C 2001/03/08 13:13:41 1.5 +++ parser3/src/main/Attic/pa_wcontext.C 2001/03/10 12:12:51 1.9 @@ -1,26 +1,27 @@ /* - $Id: pa_wcontext.C,v 1.5 2001/03/08 13:13:41 paf Exp $ + $Id: pa_wcontext.C,v 1.9 2001/03/10 12:12:51 paf Exp $ */ #include "pa_wcontext.h" #include "pa_exception.h" // appends a fstring to result -void WContext::write(String& astring) { - fstring+=astring; +void WContext::write(const String& astring, String::Untaint_lang lang) { + fstring.append(astring, lang); } // if value is VString writes fstring, // else writes Value; raises an error if already -void WContext::write(Value& avalue) { - String *fstring=avalue.get_string(); +void WContext::write(Value& avalue, String::Untaint_lang lang) { + const String *fstring=avalue.get_string(); if(fstring) - write(*fstring); + write(*fstring, lang); else if(fvalue) // already have value? THROW(0,0, // must not construct twice - &fvalue->name(), - "value already assigned, use constructor to reassign it"); + &avalue.name(), + "(%s) illegal assignment attempt to '%s' (%s), use constructor instead", + avalue.type(), fvalue->name().cstr(), fvalue->type()); else fvalue=&avalue; }