Running the Error Message Tool

 

List of:

Discussion Topic

Subjects:

Error Handling

Contents:

Application Development Manual

 


 

 

<modname>.err files contain a #define statement for each message. For example:

 

// Error code definitions for module "kernapi/api"

 

#include "kernutil/errorsys/errorsys.hxx"

#include "error/message/errmsg.hxx"

 

extern message_module api_errmod;

 

#define API_FAILED api_errmod.message_code(0)

#define EMPTY_ARRAY api_errmod.message_code(1)

...

 

#define SMALL_RAD1 api_errmod.message_code(27)

#define SMALL_RAD2 api_errmod.message_code(28)

#define SMALL_LENGTH api_errmod.message_code(29)

...

 

The e<modname>.cxx file contains the definition of the error module for the messages in this module:

 

// Error code definitions for module "kernapi/api"

 

#include "acis.hxx"

 

#include <stdio.h>

 

#include "kernutil/errorsys/errorsys.hxx"

#include "error/message/errmsg.hxx"

 

static message_list api_msglst[] =

{

 

{"API_FAILED", "operation unsuccessful"},

 

{"EMPTY_ARRAY", "array with no members given"},

...

 

 

{"SMALL_RAD1", "radius 1 is too small"},

 

{"SMALL_RAD2", "radius 2 is too small"},

 

 

{"SMALL_LENGTH", "length is too small"},

 

...

 

 

 

 

{NULL, NULL}

};

 

 

 

message_module api_errmod("kernapi/api", api_msglst);

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PDF/APPDEV/06ERR.PDF
HTM/DATA/ACIS/APPDEV/06ERR/0012.HTM