--- parser3/src/classes/op.C 2002/03/25 09:40:01 1.75 +++ parser3/src/classes/op.C 2002/03/27 13:33:31 1.77 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: op.C,v 1.75 2002/03/25 09:40:01 paf Exp $ + $Id: op.C,v 1.77 2002/03/27 13:33:31 paf Exp $ */ #include "classes.h" @@ -481,12 +481,14 @@ VHash& exception2vhash(Pool& pool, const Hash& hash=result.hash(0); if(const String *type=e.type()) hash.put(*exception_type_part_name, new(pool) VString(*type)); - if(const String *source=e.problem_source()) { - result.set_name(*source); + if(const String *asource=e.problem_source()) { + String& source=*new(pool) String(pool); + source.append(*asource, String::UL_TAINTED, true/*forced*/); + result.set_name(source); - hash.put(*exception_source_part_name, new(pool) VString(*source)); + hash.put(*exception_source_part_name, new(pool) VString(source)); #ifndef NO_STRING_ORIGIN - const Origin& origin=source->origin(); + const Origin& origin=source.origin(); hash.put(*new(pool) String(pool, "file"), new(pool) VString(*new(pool) String(pool, origin.file))); hash.put(*new(pool) String(pool, "lineno"), @@ -498,7 +500,7 @@ VHash& exception2vhash(Pool& pool, const char *pcomment=(char *)pool.malloc(comment_size); memcpy(pcomment, ecomment, comment_size); hash.put(*exception_comment_part_name, - new(pool) VString(*new(pool) String(pool, pcomment, comment_size))); + new(pool) VString(*new(pool) String(pool, pcomment, comment_size, true/*tainted*/))); } hash.put(*exception_handled_part_name, new(pool) VBool(pool, false)); @@ -515,16 +517,19 @@ static void _try_operator(Request& r, co Value *result; // taking snapshot of request processing status - int stop_index=r.stack.top_index(); + //int ssexception_trace=r.exception_trace.top_index(); + int sstack=r.stack.top_index(); Value *sself=r.self, *sroot=r.root, *srcontext=r.rcontext; WContext *swcontext=r.wcontext; try { result=&r.process(body_code); } catch(const Exception& e) { // restoring request processing status - r.stack.top_index(stop_index); + //r.exception_trace.top_index(ssexception_trace); + r.stack.top_index(sstack); r.self=sself; r.root=sroot, r.rcontext=srcontext; r.wcontext=swcontext; + VHash& vhash=exception2vhash(pool, e); Junction *junction=catch_code.get_junction();