--- parser3/src/classes/table.C 2002/08/15 10:38:18 1.160 +++ parser3/src/classes/table.C 2002/09/17 09:30:06 1.162 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_TABLE_C="$Date: 2002/08/15 10:38:18 $"; +static const char* IDENT_TABLE_C="$Date: 2002/09/17 09:30:06 $"; #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); } @@ -317,7 +317,11 @@ static void table_row_to_hash(Array::Ite new(pool) VString(*row.get_string(value_field))); } - ri.hash->put(*row.get_string(ri.key_field), &result); + const String& key=*row.get_string(ri.key_field); + if(ri.hash->put_dont_replace(key, &result)) // put. existed? + throw Exception("parser.runtime", + &key, + "duplicate key"); } } static void _hash(Request& r, const String& method_name, MethodParams *params) {