projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20f872e
)
ruby: added error message to isinstance check
author
Brad Beckmann
<Brad.Beckmann@amd.com>
Thu, 19 Nov 2009 00:34:32 +0000
(16:34 -0800)
committer
Brad Beckmann
<Brad.Beckmann@amd.com>
Thu, 19 Nov 2009 00:34:32 +0000
(16:34 -0800)
Added error message when a symbol is not an instance of a particular expected
type.
src/mem/slicc/symbols/SymbolTable.py
patch
|
blob
|
history
diff --git
a/src/mem/slicc/symbols/SymbolTable.py
b/src/mem/slicc/symbols/SymbolTable.py
index 17d7dfad3dacc02dd80cf4686754d7ce1a645bf0..6b1bf13e63c87691353195b4b63e6b834a880d18 100644
(file)
--- a/
src/mem/slicc/symbols/SymbolTable.py
+++ b/
src/mem/slicc/symbols/SymbolTable.py
@@
-72,7
+72,10
@@
class SymbolTable(object):
continue
if types is not None:
- assert isinstance(symbol, types)
+ if not isinstance(symbol, types):
+ symbol.error("Symbol '%s' is not of types '%s'.",
+ symbol,
+ types)
return symbol