Diff for /parser3/src/classes/string.C between versions 1.97 and 1.98

version 1.97, 2002/02/08 08:30:10 version 1.98, 2002/03/27 15:30:34
Line 308  public: Line 308  public:
   
         void add_column(void *ptr, size_t size) {          void add_column(void *ptr, size_t size) {
                 if(got_column)                  if(got_column)
                         throw Exception(0, 0,                          throw Exception("parser.runtime",
                                 &statement_string,                                  &statement_string,
                                 "result must contain exactly one column");                                  "result must contain exactly one column");
                 got_column=true;                  got_column=true;
Line 317  public: Line 317  public:
         void add_row() { /* ignore */ }          void add_row() { /* ignore */ }
         void add_row_cell(void *ptr, size_t size) {          void add_row_cell(void *ptr, size_t size) {
                 if(got_cell)                  if(got_cell)
                         throw Exception(0, 0,                          throw Exception("parser.runtime",
                                 &statement_string,                                  &statement_string,
                                 "result must not contain more then one row");                                  "result must not contain more then one row");
                 got_cell=true;                  got_cell=true;
Line 353  const String* sql_result_string(Request& Line 353  const String* sql_result_string(Request&
                                         offset=(ulong)r.process(*voffset).as_double();                                          offset=(ulong)r.process(*voffset).as_double();
                                 if(default_code=(Value *)options->get(*sql_default_name)) {                                  if(default_code=(Value *)options->get(*sql_default_name)) {
                                         if(!default_code->get_junction())                                          if(!default_code->get_junction())
                                                 throw Exception(0, 0,                                                  throw Exception("parser.runtime",
                                                         &method_name,                                                          &method_name,
                                                         "default option must be code");                                                          "default option must be code");
                                 }                                  }
                         } else                          } else
                                 throw Exception(0, 0,                                  throw Exception("parser.runtime",
                                         &method_name,                                          &method_name,
                                         "options must be hash");                                          "options must be hash");
         } else          } else
Line 375  const String* sql_result_string(Request& Line 375  const String* sql_result_string(Request&
                         handlers);                          handlers);
         } catch(const Exception& e) { // query problem          } catch(const Exception& e) { // query problem
                 // give more specific source [were url]                  // give more specific source [were url]
                 throw Exception(e.type(), e.code(),                  throw Exception("sql.execute",
                         &statement_string,                           &statement_string, 
                         "%s", e.comment());                          "%s", e.comment());
         }          }
Line 398  static void _sql(Request& r, const Strin Line 398  static void _sql(Request& r, const Strin
                         if(!string)                          if(!string)
                                 string=new(pool) String(pool);                                  string=new(pool) String(pool);
                 } else                  } else
                         throw Exception(0, 0,                          throw Exception("parser.runtime",
                                 &method_name,                                  &method_name,
                                 "produced no result, but no default option specified");                                  "produced no result, but no default option specified");
         }          }
Line 413  static void _replace(Request& r, const S Line 413  static void _replace(Request& r, const S
   
         Table *table=params->as_no_junction(0, "parameter must not be code").get_table();          Table *table=params->as_no_junction(0, "parameter must not be code").get_table();
         if(!table)          if(!table)
                 throw Exception(0, 0,                  throw Exception("parser.runtime",
                         &method_name,                          &method_name,
                         "parameter must be table");                          "parameter must be table");
   
Line 433  static void _save(Request& r, const Stri Line 433  static void _save(Request& r, const Stri
                 if(mode=="append")                  if(mode=="append")
                         do_append=true;                          do_append=true;
                 else                  else
                         throw Exception(0, 0,                          throw Exception("parser.runtime",
                                 &mode,                                  &mode,
                                 "unknown mode, must be 'append'");                                  "unknown mode, must be 'append'");
         }                         }               

Removed from v.1.97  
changed lines
  Added in v.1.98


E-mail: