changeset b431ec0ad43d in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=b431ec0ad43d
description:
        ruby: added error message to isinstance check
        Added error message when a symbol is not an instance of a particular 
expected
        type.

diffstat:

1 file changed, 4 insertions(+), 1 deletion(-)
src/mem/slicc/symbols/SymbolTable.py |    5 ++++-

diffs (15 lines):

diff -r bc8c8617c4f0 -r b431ec0ad43d src/mem/slicc/symbols/SymbolTable.py
--- a/src/mem/slicc/symbols/SymbolTable.py      Wed Nov 18 16:34:32 2009 -0800
+++ b/src/mem/slicc/symbols/SymbolTable.py      Wed Nov 18 16:34:32 2009 -0800
@@ -72,7 +72,10 @@
                 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
 
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to