--- parser3/src/classes/op.C 2003/07/24 11:31:20 1.129 +++ parser3/src/classes/op.C 2003/11/06 09:16:33 1.134 @@ -5,12 +5,13 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_OP_C="$Date: 2003/07/24 11:31:20 $"; +static const char* IDENT_OP_C="$Date: 2003/11/06 09:16:33 $"; #include "classes.h" #include "pa_vmethod_frame.h" #include "pa_common.h" +#include "pa_os.h" #include "pa_request.h" #include "pa_vint.h" #include "pa_sql_connection.h" @@ -50,11 +51,11 @@ static const String exception_var_name(E // helpers -class Untaint_lang_name2enum: public Hash { +class Untaint_lang_name2enum: public Hash { public: Untaint_lang_name2enum() { #define ULN(name, LANG) \ - put(StringBody(name), (value_type)(String::L_##LANG)); + put(String::Body(name), (value_type)(String::L_##LANG)); ULN("as-is", AS_IS); ULN("optimized-as-is", AS_IS|String::L_OPTIMIZE_BIT); ULN("file-spec", FILE_SPEC); @@ -321,7 +322,7 @@ public: #endif static void _switch(Request& r, MethodParams& params) { Switch_data* data=new Switch_data(r, r.process_to_value(params[0])); - Temp_hash_value + Temp_hash_value switch_data_setter(r.classes_conf, switch_data_name, data); Value& cases_code=params.as_junction(1, "switch cases must be code"); @@ -379,7 +380,7 @@ static void _case(Request& r, MethodPara // consts -const int DATA_STRING_SERIALIZED_VERSION=0x0004; +const int DATA_STRING_SERIALIZED_VERSION=0x0005; // helper types @@ -515,7 +516,7 @@ static void _cache(Request& r, MethodPar const String& file_spec=r.absolute(params.as_string(0, "filespec must be string")); Cache_data* data=new Cache_data; - Temp_hash_value + Temp_hash_value cache_data_setter(r.classes_conf, cache_data_name, data); data->expires=as_expires(r, params, 1, now); Value& body_code=params.as_junction(2, "body must be code"); @@ -587,9 +588,8 @@ static void _try_operator(Request& r, Me try { result=r.process(body_code); } catch(const Exception& e) { - Request::Exception_details details=r.get_details(e); - Request_context_saver throw_context(r); // taking snapshot of throw-context [stack trace contains error] + Request::Exception_details details=r.get_details(e); try_context.restore(); // restoring try-context to perform catch-code Junction* junction=catch_code.get_junction(); @@ -639,7 +639,7 @@ static void _throw_operator(Request& r, :0; throw Exception(type, &source, "%s", comment?comment:""); } -} + } #if defined(WIN32) && defined(_DEBUG) # define PA_BPT