diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 16:34:32 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 16:34:32 -0800 |
commit | c9764b1ff1cfa3d1d82026e00cc5b4279c87cad0 (patch) | |
tree | 53396e44a7c44b303c6ae16d3534b56fb5703c2d /src/mem | |
parent | 20f872ed2a5dd7c1c08bbafc1cd5e82d6cc7444d (diff) | |
download | gem5-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.py | 5 |
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 |