summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 16:34:32 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2009-11-18 16:34:32 -0800
commitc9764b1ff1cfa3d1d82026e00cc5b4279c87cad0 (patch)
tree53396e44a7c44b303c6ae16d3534b56fb5703c2d /src/mem
parent20f872ed2a5dd7c1c08bbafc1cd5e82d6cc7444d (diff)
downloadgem5-c9764b1ff1cfa3d1d82026e00cc5b4279c87cad0.tar.xz
ruby: added error message to isinstance check
Added error message when a symbol is not an instance of a particular expected type.
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/slicc/symbols/SymbolTable.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mem/slicc/symbols/SymbolTable.py b/src/mem/slicc/symbols/SymbolTable.py
index 17d7dfad3..6b1bf13e6 100644
--- 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