--- parser3/src/classes/file.C 2010/04/19 11:21:34 1.205 +++ parser3/src/classes/file.C 2010/07/05 05:54:46 1.207 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_FILE_C="$Date: 2010/04/19 11:21:34 $"; +static const char * const IDENT_FILE_C="$Date: 2010/07/05 05:54:46 $"; #include "pa_config_includes.h" @@ -138,9 +138,7 @@ static void _save(Request& r, MethodPara valid_options++; } if(valid_options != options->count()) - throw Exception(PARSER_RUNTIME, - 0, - INVALID_OPTION_PASSED); + throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION); } // save @@ -301,7 +299,7 @@ static void _create(Request& r, MethodPa valid_options++; } if(valid_options != options->count()) - throw Exception(PARSER_RUNTIME, 0, INVALID_OPTION_PASSED); + throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION); } if(asked_charset != 0) @@ -709,21 +707,6 @@ static void _lock(Request& r, MethodPara &info); } -static int lastposafter(const String& s, size_t after, const char* substr, size_t substr_size, bool beforelast=false) { - size_t size=0; // just to calm down compiler - if(beforelast) - size=s.length(); - size_t at; - while((at=s.pos(String::Body(substr), after))!=STRING_NOT_FOUND) { - size_t newafter=at+substr_size/*skip substr*/; - if(beforelast && newafter==size) - break; - after=newafter; - } - - return after; -} - static void _find(Request& r, MethodParams& params) { const String& file_name=params.as_no_junction(0, FILE_NAME_MUST_NOT_BE_CODE).as_string(); const String* file_spec; @@ -906,9 +889,7 @@ static void _sql(Request& r, MethodParam offset=(ulong)r.process_to_value(*voffset).as_double(); } if(valid_options!=options->count()) - throw Exception(PARSER_RUNTIME, - 0, - "called with invalid option"); + throw Exception(PARSER_RUNTIME, 0, CALLED_WITH_INVALID_OPTION); }