|
|
| version 1.127.2.22.2.7, 2003/03/21 13:42:27 | version 1.127.2.22.2.10, 2003/03/21 16:16:42 |
|---|---|
| Line 279 static void _eval(Request& r, const Stri | Line 279 static void _eval(Request& r, const Stri |
| Value* fmt=params->as_no_junction(1, "fmt must not be code"); | Value* fmt=params->as_no_junction(1, "fmt must not be code"); |
| String string; | String string; |
| string.APPEND_CONST( | string.APPEND_CONST( |
| format(value_result->as_double(), fmt->as_string()->cstr())); | format(value_result->as_double(), fmt->as_string().cstr())); |
| r.write_no_lang(string); | r.write_no_lang(string); |
| } else | } else |
| r.write_no_lang(value_result); | r.write_no_lang(value_result); |
| Line 602 static void _cache(Request& r, const Str | Line 602 static void _cache(Request& r, const Str |
| } | } |
| // also used in pa_request.C to pass param to @unhandled_exception | // also used in pa_request.C to pass param to @unhandled_exception |
| VHash* exception2vhashconst Exception& e) { | VHash& exception2vhashconst Exception& e) { |
| VHash* result(new VHash); | VHash& result=*new VHash; |
| HashStringValue& hash=result->hash(0); | HashStringValue& hash=result->hash(); |
| if(const char* type=e.type(true)) | if(const char* type=e.type(true)) |
| hash.put(exception_type_part_name, Value*(new VString(String* (new String(type))))); | hash.put(exception_type_part_name, Value*(new VString(String* (new String(type))))); |
| if(const String& asource=e.problem_source()) { | if(const String& asource=e.problem_source()) { |
| Line 654 static void _try_operator(Request& r, co | Line 654 static void _try_operator(Request& r, co |
| result=r.process(catch_code); | result=r.process(catch_code); |
| bool handled=false; | bool handled=false; |
| if(Value* value= | if(Value* value= |
| vhash->hash(0).get(exception_handled_part_name)) | vhash->hash().get(exception_handled_part_name)) |
| handled=value->as_bool(); | handled=value->as_bool(); |
| junction->method_frame->put_element(exception_var_name, saved_exception_var_value, false); | junction->method_frame->put_element(exception_var_name, saved_exception_var_value, false); |
| Line 674 static void _throw_operator(Request& r, | Line 674 static void _throw_operator(Request& r, |
| if(HashStringValue *hash=param0->get_hash(method_name)) { | if(HashStringValue *hash=param0->get_hash(method_name)) { |
| const char* type=0; | const char* type=0; |
| if(Value* value=hash->get(exception_type_part_name)) | if(Value* value=hash->get(exception_type_part_name)) |
| type=value->as_string()->cstr(); | type=value->as_string().cstr(); |
| const String* source; | const String* source; |
| if(Value* value=hash->get(exception_source_part_name)) | if(Value* value=hash->get(exception_source_part_name)) |
| source=value->as_string(); | source=value->as_string(); |
| const char* comment; | const char* comment; |
| if(Value* value=hash->get(exception_comment_part_name)) | if(Value* value=hash->get(exception_comment_part_name)) |
| comment=value->as_string()->cstr(); | comment=value->as_string().cstr(); |
| throw Exception(type, | throw Exception(type, |
| source?source:method_name, | source?source:method_name, |