Added path info to the script context "Not read yet" error messages

Also added extra info to sct_positmotor table lookup error message.

r2908 | ffr | 2010-05-05 18:07:15 +1000 (Wed, 05 May 2010) | 3 lines
This commit is contained in:
Ferdi Franceschini
2010-05-05 18:07:15 +10:00
committed by Douglas Clowes
parent 10fac1f288
commit 1c4d6f398a
2 changed files with 5 additions and 2 deletions

View File

@@ -555,12 +555,15 @@ int SctAddPollNode(SctController *controller, Hdb *node, double interval,
DevPrio prio, char *action) { DevPrio prio, char *action) {
SctData *data; SctData *data;
hdbCallback *cb; hdbCallback *cb;
char nodePath[512], info[1024];
if (! FindHdbCallbackData(node, controller)) { if (! FindHdbCallbackData(node, controller)) {
cb = MakeHipadabaCallback(SctMainCallback, controller, NULL); cb = MakeHipadabaCallback(SctMainCallback, controller, NULL);
assert(cb); assert(cb);
AppendHipadabaCallback(node, cb); AppendHipadabaCallback(node, cb);
SetHdbProperty(node,"geterror","Not read yet"); GetHdbPath(node, nodePath, sizeof nodePath);
snprintf(info, 1023, "%s: Not read yet", nodePath);
SetHdbProperty(node,"geterror",info);
} }
data = calloc(1, sizeof(*data)); data = calloc(1, sizeof(*data));

View File

@@ -106,7 +106,7 @@ proc ::scobj::positmotor::mot2ID {mot precision table} {
set iprev $i set iprev $i
set mprev $m set mprev $m
} }
return -code error "lookup failed" return -code error "positmotor [sct] table lookup failed for position $mot. Table range = $firstMot to $lastMot"
} }
namespace import ::scobj::positmotor::* namespace import ::scobj::positmotor::*