--- parser3/src/classes/void.C 2002/03/27 15:30:34 1.17 +++ parser3/src/classes/void.C 2002/08/15 10:38:18 1.22 @@ -3,10 +3,10 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - - $Id: void.C,v 1.17 2002/03/27 15:30:34 paf Exp $ */ +static const char* IDENT_VOID_C="$Date: 2002/08/15 10:38:18 $"; + #include "classes.h" #include "pa_request.h" #include "pa_vint.h" @@ -14,10 +14,6 @@ #include "pa_vvoid.h" #include "pa_sql_connection.h" -// defines - -#define VOID_CLASS_NAME "void" - // class class MVoid : public Methoded { @@ -70,28 +66,19 @@ static void _sql(Request& r, const Strin Value& statement=params->as_junction(0, "statement must be code"); Temp_lang temp_lang(r, String::UL_SQL); - const String& statement_string=r.process(statement).as_string(); + const String& statement_string=r.process_to_string(statement); const char *statement_cstr= statement_string.cstr(String::UL_UNSPECIFIED, r.connection(&method_name)); Void_sql_event_handlers handlers(pool, statement_string); - try { - r.connection(&method_name)->query( - statement_cstr, 0, 0, - handlers); - } catch(const Exception& e) { - // more specific source [were url] - throw Exception("sql.execute", - &statement_string, - "%s", e.comment()); - } + r.connection(&method_name)->query( + statement_cstr, 0, 0, + handlers, + statement_string); } // constructor -MVoid::MVoid(Pool& apool) : Methoded(apool) { - set_name(*NEW String(pool(), VOID_CLASS_NAME)); - - +MVoid::MVoid(Pool& apool) : Methoded(apool, "void") { // ^void.int[] // ^void.int(default) add_native_method("int", Method::CT_DYNAMIC, _int, 0, 1);