Branch: Tag:

2002-12-07

2002-12-07 16:47:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved error handling.

Rev: lib/modules/Tools.pmod/AutoDoc.pmod/DocParser.pmod:1.49

95:    "enum" : ({ "name" }),   ]);    + mapping(string:array(string)) required_attributes = + ([ +  "param" : ({ "name" }), + ]); +    static constant standard = (<    "note", "bugs", "example", "seealso", "deprecated", "fixme"   >);
470:    parseError(sprintf("@%s with too many parameters", keyword));    for (int i = 0; i < sizeof(args); ++i)    res[attrnames[i]] = attributequote(args[i]); +  foreach(required_attributes[keyword], string attrname) { +  if (!res[attrname]) { +  parseError(sprintf("@%s lacking required parameter %s", +  keyword, attrname)); +  } +  }    return res;    }