--- parser3/src/main/pa_request.C 2003/04/02 14:16:19 1.245.2.37.2.20 +++ parser3/src/main/pa_request.C 2003/04/03 06:40:39 1.245.2.37.2.22 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_REQUEST_C="$Date: 2003/04/02 14:16:19 $"; +static const char* IDENT_REQUEST_C="$Date: 2003/04/03 06:40:39 $"; #include "pa_sapi.h" #include "pa_common.h" @@ -373,6 +373,8 @@ t[9]-t[3] } catch(const Exception& e) { // request handling problem // we're returning not result, but error explanation try { + //if(size_t top_index=!exception_trace.is_empty()) + // log the beast if(const String* problem_source=e.problem_source()) SAPI::log(sapi_info, @@ -420,24 +422,21 @@ t[9]-t[3] *stack_trace_columns+=new String("name"); *stack_trace_columns+=new String("file"); *stack_trace_columns+=new String("lineno"); + *stack_trace_columns+=new String("colno"); Table& stack_trace=*new Table(stack_trace_columns); - /*Array_iterator tracei(exception_trace); - while(tracei.has_next()) { + for(Array_iterator i(exception_trace); i.has_next(); ) { + Trace trace=i.next(); Table::element_type row(new ArrayString); - const String* name=tracei.next(); - *row+=name; // name column -#ifndef NO_STRING_ORIGIN - const String_fragment::Origin& origin=name->origin(); - if(origin.file) { - *row+=StringBody(origin.file, 0, true)); // file column - *row+=StringBody( - format_integer(1+origin.line), - 0, true)); // line column + *row+=trace.name(); // name column + Operation::Info origin=trace.origin(); + if(origin.file_no) { + *row+=new String(file_list[origin.file_no], String::L_TAINTED); // 'file' column + *row+=new String(StringBody::Format(1+origin.line), String::L_CLEAN); // 'lineno' column + *row+=new String(StringBody::Format(1+origin.col), String::L_CLEAN); // 'colno' column } -#endif - *stack_trace+=row; - }*/ + stack_trace+=row; + } frame.store_param(*new VTable(&stack_trace)); // future $response:body=