Branch: Tag:

2000-01-23

2000-01-23 13:50:26 by Martin Nilsson <mani@lysator.liu.se>

Changing back from report_debug to report_error where there really is an error

Rev: server/base_server/module.pike:1.70

1: - /* $Id: module.pike,v 1.69 2000/01/18 15:15:03 mast Exp $ */ + /* $Id: module.pike,v 1.70 2000/01/23 13:50:26 nilsson Exp $ */   #include <module.h>   #include <request_trace.h>   
131: Inside #if defined(MODULE_DEBUG)
  // report_debug("Variable names beginning with '_' are reserved for"   // " internal usage.\n");    if (!stringp(name)) -  report_debug("The variable "+var+"has no name.\n"); +  report_error("The variable "+var+"has no name.\n");       if((search(name, "\"") != -1)) -  report_debug("Please do not use \" in variable names"); +  report_error("Please do not use \" in variable names");       if (!stringp(doc_str))    doc_str = "No documentation";
143: Inside #if defined(MODULE_DEBUG)
   {    case TYPE_NODE:    if(!arrayp(value)) -  report_debug("TYPE_NODE variables should contain a list of variables " +  report_error("TYPE_NODE variables should contain a list of variables "    "to use as subnodes.\n");    break;    case TYPE_CUSTOM:
153: Inside #if defined(MODULE_DEBUG)
   && functionp(misc[0])    && functionp(misc[1])    && functionp(misc[2])) -  report_debug("When defining a TYPE_CUSTOM variable, the MISC " +  report_error("When defining a TYPE_CUSTOM variable, the MISC "    "field must be an array of functionpointers: \n"    "({describe,describe_form,set_from_form})\n");    break;
164: Inside #if defined(MODULE_DEBUG)
   case TYPE_LOCATION:    case TYPE_PASSWORD:    if(value && !stringp(value)) { -  report_debug("%s:\nPassing illegal value (%t:%O) " +  report_error("%s:\nPassing illegal value (%t:%O) "    "to string type variable.\n",    roxen->filename(this), value, value);    }
172: Inside #if defined(MODULE_DEBUG)
      case TYPE_FLOAT:    if(!floatp(value)) -  report_debug("%s:\nPassing illegal value (%t:%O) " +  report_error("%s:\nPassing illegal value (%t:%O) "    "(not float) to floating point "    "decimal number variable.\n",    roxen->filename(this), value, value);    break;    case TYPE_INT:    if(!intp(value)) -  report_debug("%s:\nPassing illegal value (%t:%O) " +  report_error("%s:\nPassing illegal value (%t:%O) "    "(not int) to integer number variable.\n",    roxen->filename(this), value, value);    break;
196: Inside #if defined(MODULE_DEBUG)
   case TYPE_DIR_LIST:    int i;    if(!arrayp(value)) { -  report_debug("%s:\nIllegal type %t to TYPE_DIR_LIST, " +  report_error("%s:\nIllegal type %t to TYPE_DIR_LIST, "    "must be array.\n",    roxen->filename(this), value);    value = ({ "./" });
214: Inside #if defined(MODULE_DEBUG)
      case TYPE_DIR:    if(value && !stringp(value)) -  report_debug("%s:\nPassing illegal value (%t:%O) (not string) " +  report_error("%s:\nPassing illegal value (%t:%O) (not string) "    "to directory variable.\n",    roxen->filename(this), value, value);   
225: Inside #if defined(MODULE_DEBUG)
   case TYPE_INT_LIST:    case TYPE_STRING_LIST:    if(!misc && value && !arrayp(value)) { -  report_debug("%s:\nPassing illegal misc (%t:%O) (not array) " +  report_error("%s:\nPassing illegal misc (%t:%O) (not array) "    "to multiple choice variable.\n",    roxen->filename(this), value, value);    } else {    if(misc && !arrayp(misc)) { -  report_debug("%s:\nPassing illegal misc (%t:%O) (not array) " +  report_error("%s:\nPassing illegal misc (%t:%O) (not array) "    "to multiple choice variable.\n",    roxen->filename(this), misc, misc);    }    if(misc && value && search(misc, value)==-1) { -  report_debug("%s:\nPassing value (%t:%O) not present " +  report_error("%s:\nPassing value (%t:%O) not present "    "in the misc array.\n",    roxen->filename(this), value, value);    }
251: Inside #if defined(MODULE_DEBUG)
      case TYPE_COLOR:    if (!intp(value)) -  report_debug("%s:\nPassing illegal value (%t:%O) (not int) " +  report_error("%s:\nPassing illegal value (%t:%O) (not int) "    "to color variable.\n",    roxen->filename(this), value, value);    break;
263: Inside #if defined(MODULE_DEBUG)
   break;       default: -  report_debug("%s:\nIllegal type (%s) in defvar.\n", +  report_error("%s:\nIllegal type (%s) in defvar.\n",    roxen->filename(this), type);    break;    }