本文整理汇总了C++中PrintErrorID函数的典型用法代码示例。如果您正苦于以下问题:C++ PrintErrorID函数的具体用法?C++ PrintErrorID怎么用?C++ PrintErrorID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PrintErrorID函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FactRetractedErrorMessage
void FactRetractedErrorMessage(
Environment *theEnv,
Fact *theFact)
{
char tempBuffer[20];
PrintErrorID(theEnv,"PRNTUTIL",11,false);
WriteString(theEnv,STDERR,"The fact ");
gensprintf(tempBuffer,"f-%lld",theFact->factIndex);
WriteString(theEnv,STDERR,tempBuffer);
WriteString(theEnv,STDERR," has been retracted.\n");
}
示例2: SalienceRangeError
void SalienceRangeError(
Environment *theEnv,
int min,
int max)
{
PrintErrorID(theEnv,"PRNTUTIL",9,true);
WriteString(theEnv,STDERR,"Salience value out of range ");
WriteInteger(theEnv,STDERR,min);
WriteString(theEnv,STDERR," to ");
WriteInteger(theEnv,STDERR,max);
WriteString(theEnv,STDERR,".\n");
}
示例3: SalienceRangeError
globle void SalienceRangeError(
void *theEnv,
int min,
int max)
{
PrintErrorID(theEnv,"PRNTUTIL",9,TRUE);
EnvPrintRouter(theEnv,WERROR,"Salience value out of range ");
PrintLongInteger(theEnv,WERROR,(long int) min);
EnvPrintRouter(theEnv,WERROR," to ");
PrintLongInteger(theEnv,WERROR,(long int) max);
EnvPrintRouter(theEnv,WERROR,".\n");
}
示例4: OpenErrorMessage
void OpenErrorMessage(
Environment *theEnv,
const char *functionName,
const char *fileName)
{
PrintErrorID(theEnv,"ARGACCES",3,false);
WriteString(theEnv,STDERR,"Function '");
WriteString(theEnv,STDERR,functionName);
WriteString(theEnv,STDERR,"' was unable to open file '");
WriteString(theEnv,STDERR,fileName);
WriteString(theEnv,STDERR,"'.\n");
}
示例5: EnvBatchStar
globle int EnvBatchStar(
void *theEnv,
char *fileName)
{
#if (MAC_MCW || IBM_MCW) && RUN_TIME
#pragma unused(fileName)
#endif
PrintErrorID(theEnv,"FILECOM",1,FALSE);
EnvPrintRouter(theEnv,WERROR,"Function batch* does not work in run time modules.\n");
return(FALSE);
}
示例6: CantDeleteItemErrorMessage
void CantDeleteItemErrorMessage(
Environment *theEnv,
const char *itemType,
const char *itemName)
{
PrintErrorID(theEnv,"PRNTUTIL",4,false);
WriteString(theEnv,STDERR,"Unable to delete ");
WriteString(theEnv,STDERR,itemType);
WriteString(theEnv,STDERR," '");
WriteString(theEnv,STDERR,itemName);
WriteString(theEnv,STDERR,"'.\n");
}
示例7: ExpectedTypeError0
void ExpectedTypeError0(
Environment *theEnv,
const char *functionName,
unsigned int whichArg)
{
PrintErrorID(theEnv,"ARGACCES",2,false);
WriteString(theEnv,STDERR,"Function '");
WriteString(theEnv,STDERR,functionName);
WriteString(theEnv,STDERR,"' expected argument #");
WriteInteger(theEnv,STDERR,whichArg);
WriteString(theEnv,STDERR," to be of type ");
}
示例8: ConstraintConflictMessage
static void ConstraintConflictMessage(
void *theEnv,
struct symbolHashNode *variableName,
int thePattern,
int theField,
struct symbolHashNode *theSlot)
{
/*=========================*/
/* Print the error header. */
/*=========================*/
PrintErrorID(theEnv,"RULECSTR",1,TRUE);
/*======================================================*/
/* Print the variable name (if available) and CE number */
/* for which the constraint violation occurred. */
/*======================================================*/
if (variableName != NULL)
{
EnvPrintRouter(theEnv,WERROR,"Variable ?");
EnvPrintRouter(theEnv,WERROR,ValueToString(variableName));
EnvPrintRouter(theEnv,WERROR," in CE #");
PrintLongInteger(theEnv,WERROR,(long int) thePattern);
}
else
{
EnvPrintRouter(theEnv,WERROR,"Pattern #");
PrintLongInteger(theEnv,WERROR,(long int) thePattern);
}
/*=======================================*/
/* Print the slot name or field position */
/* in which the violation occurred. */
/*=======================================*/
if (theSlot == NULL)
{
EnvPrintRouter(theEnv,WERROR," field #");
PrintLongInteger(theEnv,WERROR,(long int) theField);
}
else
{
EnvPrintRouter(theEnv,WERROR," slot ");
EnvPrintRouter(theEnv,WERROR,ValueToString(theSlot));
}
/*======================================*/
/* Print the rest of the error message. */
/*======================================*/
EnvPrintRouter(theEnv,WERROR,"\nhas constraint conflicts which make the pattern unmatchable.\n");
}
示例9: CantDeleteItemErrorMessage
globle void CantDeleteItemErrorMessage(
void *theEnv,
const char *itemType,
const char *itemName)
{
PrintErrorID(theEnv,"PRNTUTIL",4,FALSE);
EnvPrintRouter(theEnv,WERROR,"Unable to delete ");
EnvPrintRouter(theEnv,WERROR,itemType);
EnvPrintRouter(theEnv,WERROR," ");
EnvPrintRouter(theEnv,WERROR,itemName);
EnvPrintRouter(theEnv,WERROR,".\n");
}
示例10: OpenErrorMessage
globle void OpenErrorMessage(
void *theEnv,
char *functionName,
char *fileName)
{
PrintErrorID(theEnv,"ARGACCES",2,FALSE);
EnvPrintRouter(theEnv,WERROR,"Function ");
EnvPrintRouter(theEnv,WERROR,functionName);
EnvPrintRouter(theEnv,WERROR," was unable to open file ");
EnvPrintRouter(theEnv,WERROR,fileName);
EnvPrintRouter(theEnv,WERROR,".\n");
}
示例11: CheckSyntax
globle int CheckSyntax(
void *theEnv,
const char *theString,
DATA_OBJECT_PTR returnValue)
{
PrintErrorID(theEnv,"PARSEFUN",1,FALSE);
EnvPrintRouter(theEnv,WERROR,"Function check-syntax does not work in run time modules.\n");
SetpType(returnValue,SYMBOL);
SetpValue(returnValue,EnvTrueSymbol(theEnv));
return(TRUE);
}
示例12: ClassExistError
/***************************************************************
NAME : ClassExistError
DESCRIPTION : Prints out error message for non-existent class
INPUTS : 1) Name of function having the error
2) The name of the non-existent class
RETURNS : Nothing useful
SIDE EFFECTS : None
NOTES : None
***************************************************************/
globle void ClassExistError(
char *func,
char *cname)
{
PrintErrorID("CLASSFUN",1,FALSE);
PrintRouter(WERROR,"Unable to find class ");
PrintRouter(WERROR,cname);
PrintRouter(WERROR," in function ");
PrintRouter(WERROR,func);
PrintRouter(WERROR,".\n");
SetEvaluationError(TRUE);
}
示例13: DefaultOutOfMemoryFunction
globle int DefaultOutOfMemoryFunction(
void *theEnv,
unsigned long size)
{
#if MAC_MCW || IBM_MCW || MAC_XCD
#pragma unused(size)
#endif
PrintErrorID(theEnv,"MEMORY",1,TRUE);
EnvPrintRouter(theEnv,WERROR,"Out of memory.\n");
EnvExitRouter(theEnv,EXIT_FAILURE);
return(TRUE);
}
示例14: ReservedPatternSymbolErrorMsg
void ReservedPatternSymbolErrorMsg(
Environment *theEnv,
const char *theSymbol,
const char *usedFor)
{
PrintErrorID(theEnv,"PATTERN",1,true);
WriteString(theEnv,STDERR,"The symbol '");
WriteString(theEnv,STDERR,theSymbol);
WriteString(theEnv,STDERR,"' has special meaning ");
WriteString(theEnv,STDERR,"and may not be used as ");
WriteString(theEnv,STDERR,usedFor);
WriteString(theEnv,STDERR,".\n");
}
示例15: InvalidDeftemplateSlotMessage
void InvalidDeftemplateSlotMessage(
void *theEnv,
const char *slotName,
const char *deftemplateName,
bool printCR)
{
PrintErrorID(theEnv,"TMPLTDEF",1,printCR);
EnvPrintRouter(theEnv,WERROR,"Invalid slot ");
EnvPrintRouter(theEnv,WERROR,slotName);
EnvPrintRouter(theEnv,WERROR," not defined in corresponding deftemplate ");
EnvPrintRouter(theEnv,WERROR,deftemplateName);
EnvPrintRouter(theEnv,WERROR,".\n");
}