--- parser3/src/classes/string.C 2001/07/26 12:25:37 1.67 +++ parser3/src/classes/string.C 2001/08/02 09:58:33 1.69 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) */ -static const char *RCSId="$Id: string.C,v 1.67 2001/07/26 12:25:37 parser Exp $"; +static const char *RCSId="$Id: string.C,v 1.69 2001/08/02 09:58:33 parser Exp $"; #include "classes.h" #include "pa_request.h" @@ -124,10 +124,10 @@ static void _lsplit(Request& r, const St Table& table=*new(pool) Table(pool, &string, &columns, pieces.size()); - int size=pieces.quick_size(); - for(int i=0; ias_junction(1, "default result must code"); - Value& processed_code=r.process(default_code); - string=processed_code.get_string(); - if(!string) - string=empty_string; + if(params->size()>1) { + Value& default_code=params->as_junction(1, "default result must code"); + Value& processed_code=r.process(default_code); + string=processed_code.get_string(); + if(!string) + string=empty_string; + } else + PTHROW(0, 0, + &method_name, + "produced no result, but no default specified"); } VString& result=*new(pool) VString(*string); result.set_name(method_name);