--- parser3/src/main/pa_request.C 2003/11/07 13:59:22 1.252 +++ parser3/src/main/pa_request.C 2003/11/20 16:39:49 1.257 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_REQUEST_C="$Date: 2003/11/07 13:59:22 $"; +static const char * const IDENT_REQUEST_C="$Date: 2003/11/20 16:39:49 $"; #include "pa_sapi.h" #include "pa_common.h" @@ -31,6 +31,7 @@ static const char* IDENT_REQUEST_C="$Dat #include "pa_vcookie.h" #include "pa_vresponse.h" #include "pa_vmemory.h" +#include "pa_vconsole.h" // consts @@ -51,7 +52,6 @@ const char* ORIGINS_CONTENT_TYPE="text/p #define EXCEPTION_TYPE_PART_NAME "type" #define EXCEPTION_SOURCE_PART_NAME "source" #define EXCEPTION_COMMENT_PART_NAME "comment" -#define EXCEPTION_HANDLED_PART_NAME "handled" // globals @@ -113,8 +113,8 @@ Request::Request(SAPI_Info& asapi_info, #endif // public - sapi_info(asapi_info), request_info(arequest_info), + sapi_info(asapi_info), charsets(UTF8_charset, UTF8_charset, UTF8_charset), // default charsets main_class(VClassMAIN_create()), @@ -155,6 +155,8 @@ Request::Request(SAPI_Info& asapi_info, classes().put(String::Body(REQUEST_CLASS_NAME), new VRequest(arequest_info, charsets)); // cookie class classes().put(String::Body(COOKIE_CLASS_NAME), &cookie); + // console class + classes().put(String::Body(CONSOLE_CLASS_NAME), new VConsole()); /// methoded // response class @@ -267,7 +269,6 @@ gettimeofday(&mt[0],NULL); --after; } - int step=0; while(const char* before=strchr(after, '/')) { String& sfile_spec=*new String; if(after!=request_info.path_translated) { @@ -480,17 +481,9 @@ body_string=&execute_method(frame, *meth // make up result: $origin $source $comment $type $code char *buf=new(PointerFreeGC) char[MAX_STRING]; size_t printed=0; - if(const String* problem_source=e.problem_source()) { - /*const String_fragment::Origin& origin=problem_source->origin(); - if(origin.file) - printed+=snprintf(buf+printed, MAX_STRING-printed, - PA_ORIGIN_FILE_POS_FORMAT, - origin.file, 1+origin.line - ); + if(const String* problem_source=e.problem_source()) printed+=snprintf(buf+printed, MAX_STRING-printed, "'%s' ", - problem_source->cstr().get()); - */ - } + problem_source->cstr()); if(const char* comment=e.comment(true)) printed+=snprintf(buf+printed, MAX_STRING-printed, "%s", comment); if(const char* type=e.type(true))