stats: Add more information to uninitialized error
ClockedObject was changed to require its regStats() to be called from every child class. If you forget to do this, the error was indecipherable. This patch makes the error more clear.
This commit is contained in:
parent
c87b717dbd
commit
824c87634d
1 changed files with 3 additions and 1 deletions
|
@ -221,7 +221,9 @@ Info::baseCheck() const
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cprintf("this is stat number %d\n", id);
|
cprintf("this is stat number %d\n", id);
|
||||||
#endif
|
#endif
|
||||||
panic("Not all stats have been initialized");
|
panic("Not all stats have been initialized.\n"
|
||||||
|
"You may need to add <ParentClass>::regStats() to a"
|
||||||
|
" new SimObject's regStats() function.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue