|
|
| version 1.330, 2009/04/30 04:39:29 | version 1.331, 2009/05/01 11:41:14 |
|---|---|
| Line 1034 StringOrValue Request::process(Value& in | Line 1034 StringOrValue Request::process(Value& in |
| VMethodFrame frame(*junction, method_frame/*caller*/); | VMethodFrame frame(*junction, method_frame/*caller*/); |
| int param_count=frame.method_params_count(); | int param_count=frame.method_params_count(); |
| if(junction->auto_name){ // default getter | if(param_count){ |
| if(param_count>1) | if(junction->auto_name){ // default getter |
| if(param_count==1){ | |
| Value *param=new VString(*junction->auto_name); | |
| frame.store_params(¶m, 1); | |
| } else | |
| throw Exception(PARSER_RUNTIME, | |
| 0, | |
| "default getter method can't have more then 1 parameter (has %d parameters)", param_count); | |
| } else | |
| throw Exception(PARSER_RUNTIME, | throw Exception(PARSER_RUNTIME, |
| 0, | 0, |
| "default getter method can't have more then 1 parameter (has %d parameters)", param_count); | "getter method must have no parameters (has %d parameters)", param_count); |
| } else if(param_count) | } // no need for else frame.empty_params() |
| throw Exception(PARSER_RUNTIME, | |
| 0, | |
| "getter method must have no parameters (has %d parameters)", param_count); | |
| if(junction->auto_name && param_count){ | |
| Value *param=new VString(*junction->auto_name); | |
| frame.store_params(¶m, 1); | |
| } else { | |
| frame.empty_params(); | |
| } | |
| frame.set_self(frame.junction.self); | frame.set_self(frame.junction.self); |