rem: return err;
context: AdpLogError(NsInterp *itPtr){    Tcl_Interp *interp = itPtr->interp;    Ns_Conn *conn = itPtr->conn;     Ns_DString ds;    Tcl_Obj *objv[2];    AdpFrame *framePtr;    char *file, *inc, *err;    int i;        framePtr = itPtr->adp.framePtr;    Ns_DStringInit(&ds);    Ns_DStringPrintf(&ds, "\n    at line %d of adp:",		     framePtr->line + interp->errorLine);    inc = "";    while (framePtr != NULL) {	file = framePtr->file;	if (file == NULL) {	    file = "<inline script>";	}	Ns_DStringPrintf(&ds, "\n        %s%s", inc, file);	inc = "included from: ";	if (framePtr->ident != NULL) {	    Ns_DStringPrintf(&ds, " {%s}", Tcl_GetString(framePtr->ident));	}	framePtr = framePtr->prevPtr;    }    if (conn != NULL && (itPtr->adp.flags & ADP_DETAIL)) {	Ns_DStringPrintf(&ds, "\n    while processing connection #%d:\n%8s%s",			 Ns_ConnId(conn), "",			 conn->request->line);	for (i = 0; i < Ns_SetSize(conn->headers); ++i) {	    Ns_DStringPrintf(&ds, "\n        %s: %s",			     Ns_SetKey(conn->headers, i),			     Ns_SetValue(conn->headers, i));	}    }    Tcl_AddErrorInfo(interp, ds.string);    err = Ns_TclLogError(interp);    Ns_DStringFree(&ds);    file = itPtr->servPtr->adp.errorpage;    if (file != NULL && itPtr->adp.errorLevel == 0) {	++itPtr->adp.errorLevel;	objv[0] = Tcl_NewStringObj(file, -1);	Tcl_IncrRefCount(objv[0]);	objv[1] = Tcl_GetVar2Ex(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);	if (objv[1] == NULL) {	    objv[1] = Tcl_GetObjResult(interp);	}	(void) NsAdpInclude(itPtr, file, 2, objv, NULL);	Tcl_DecrRefCount(objv[0]);	--itPtr->adp.errorLevel;    }    return err;}