ctf: Handle traces with unknown event attributes
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 24 Sep 2012 20:21:09 +0000 (16:21 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 2 Oct 2012 18:19:03 +0000 (14:19 -0400)
Instead of blowing up when it sees an attribute is doesn't know,
the parser should just ignore it. This is quite important,
since CTF allows for custom attributes and the parser can't
know in advance about all possible ones.

Ideally, we should also log whenever an unkown attribute is seen.
Unfortunately there is no logging in place in the ctf.core plugins
yet.

Change-Id: I45aba769205060cdcac6935cecc1479b026a5bc0
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/7904

org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/internal/ctf/core/event/metadata/IOStructGen.java

index 2b300762971d934e29feae7b83452636dad2a548..3b17b6f1e5076dbe29e8d9102f7e4dd731739ff0 100644 (file)
@@ -794,7 +794,8 @@ public class IOStructGen {
             long logLevel = parseUnaryInteger((CommonTree) rightNode.getChild(0));
             event.setLogLevel(logLevel);
         } else {
-            throw new ParseException("Unknown event attribute : " + left); //$NON-NLS-1$
+            /* Unknown event attribute, we'll simply ignore it */
+            // FIXME log this?
         }
     }
 
This page took 0.027531 seconds and 5 git commands to generate.