improve message for missing INAM/SNAM
Include the requested function name
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "alarm.h"
|
||||
#include "cantProceed.h"
|
||||
#include "epicsStdio.h"
|
||||
#include "dbDefs.h"
|
||||
#include "dbEvent.h"
|
||||
#include "dbAccess.h"
|
||||
@@ -141,8 +142,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (pfunc) {
|
||||
pfunc(prec);
|
||||
} else {
|
||||
recGblRecordError(S_db_BadSub, (void *)prec,
|
||||
"aSubRecord::init_record - INAM subr not found");
|
||||
fprintf(stderr, "%s.INAM " ERL_ERROR " function '%s' not found\n",
|
||||
prec->name, prec->inam);
|
||||
return S_db_BadSub;
|
||||
}
|
||||
}
|
||||
@@ -153,8 +154,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (pfunc)
|
||||
prec->sadr = pfunc;
|
||||
else {
|
||||
recGblRecordError(S_db_BadSub, (void *)prec,
|
||||
"aSubRecord::init_record - SNAM subr not found");
|
||||
fprintf(stderr, "%s.SNAM " ERL_ERROR " function '%s' not found\n",
|
||||
prec->name, prec->snam);
|
||||
return S_db_BadSub;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
/* convert the initialization subroutine name */
|
||||
psubroutine = (SUBFUNCPTR)registryFunctionFind(prec->inam);
|
||||
if (psubroutine == 0) {
|
||||
recGblRecordError(S_db_BadSub, (void *)prec, "Init subroutine (INAM)");
|
||||
fprintf(stderr, "%s.INAM " ERL_ERROR " function '%s' not found\n",
|
||||
prec->name, prec->inam);
|
||||
return S_db_BadSub;
|
||||
}
|
||||
/* invoke the initialization subroutine */
|
||||
@@ -122,7 +123,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
}
|
||||
prec->sadr = (SUBFUNCPTR)registryFunctionFind(prec->snam);
|
||||
if (prec->sadr == NULL) {
|
||||
recGblRecordError(S_db_BadSub, (void *)prec, "Proc subroutine (SNAM)");
|
||||
fprintf(stderr, "%s.SNAM " ERL_ERROR " function '%s' not found\n",
|
||||
prec->name, prec->snam);
|
||||
return S_db_BadSub;
|
||||
}
|
||||
prec->mlst = prec->val;
|
||||
@@ -186,8 +188,8 @@ static long special(DBADDR *paddr, int after)
|
||||
prec->sadr = (SUBFUNCPTR)registryFunctionFind(prec->snam);
|
||||
if (prec->sadr) return 0;
|
||||
|
||||
recGblRecordError(S_db_BadSub, (void *)prec,
|
||||
"subRecord(special) registryFunctionFind failed");
|
||||
fprintf(stderr, "%s " ERL_ERROR " subRecord::special - SNAM = '%s' not found\n",
|
||||
prec->name, prec->snam);
|
||||
return S_db_BadSub;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user