--- parser3/src/classes/table.C 2002/08/13 13:08:46 1.159 +++ parser3/src/classes/table.C 2002/09/17 08:44:45 1.161 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_TABLE_C="$Date: 2002/08/13 13:08:46 $"; +static const char* IDENT_TABLE_C="$Date: 2002/09/17 08:44:45 $"; #include "classes.h" #include "pa_common.h" @@ -281,14 +281,14 @@ static void _menu(Request& r, const Stri for(int row=0; rowsize()) // need delim & iteration produced string? + StringOrValue sv_processed=r.process(body_code); + const String *s_processed=sv_processed.get_string(); + if(delim_maybe_code && s_processed && s_processed->size()) { // delimiter set and we have body + if(need_delim) // need delim & iteration produced string? r.write_pass_lang(r.process(*delim_maybe_code)); need_delim=true; } - r.write_pass_lang(processed_body); + r.write_pass_lang(sv_processed); } table.set_current(saved_current); } @@ -616,15 +616,15 @@ static void _sql(Request& r, const Strin statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name)); Table_sql_event_handlers handlers(pool, method_name, statement_string, statement_cstr); - try { #ifdef RESOURCES_DEBUG struct timeval mt[2]; //measure:before gettimeofday(&mt[0],NULL); #endif - r.connection(&method_name)->query( - statement_cstr, offset, limit, - handlers); + r.connection(&method_name)->query( + statement_cstr, offset, limit, + handlers, + statement_string); #ifdef RESOURCES_DEBUG //measure:after connect @@ -636,12 +636,6 @@ static void _sql(Request& r, const Strin r.sql_request_time+=t[1]-t[0]; #endif - } catch(const Exception& e) { // query problem - // more specific source [were url] - throw Exception("sql.execute", - &statement_string, - "%s", e.comment()); - } Table *result= handlers.table?handlers.table: // query resulted in table? return it