X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.ctf.core%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Fctf%2Fcore%2Ftrace%2FMetadata.java;h=27ca681d63be828d4c3e67c81b0d9a99f2ee895a;hb=a94410d92f16c8ce3870bb2e1538b93e038e4f78;hp=92e0129139576c8b211071b13da9628a30bdf792;hpb=45cbd8dc8db7753379420a93602904f62771396e;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java b/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java index 92e0129139..27ca681d63 100644 --- a/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java +++ b/org.eclipse.linuxtools.ctf.core/src/org/eclipse/linuxtools/ctf/core/trace/Metadata.java @@ -27,6 +27,7 @@ import java.util.UUID; import org.antlr.runtime.ANTLRReaderStream; import org.antlr.runtime.CommonTokenStream; +import org.antlr.runtime.MismatchedTokenException; import org.antlr.runtime.RecognitionException; import org.antlr.runtime.tree.CommonTree; import org.eclipse.linuxtools.ctf.parser.CTFLexer; @@ -174,11 +175,9 @@ public class Metadata { tempException = new CTFReaderException(e); } catch (ParseException e) { tempException = new CTFReaderException(e); + } catch (MismatchedTokenException e) { + tempException = new CTFReaderException(e); } catch (RecognitionException e) { - /* - * We don't want to expose this ANTLR-specific exception type to the - * outside.. - */ tempException = new CTFReaderException(e); } @@ -250,8 +249,7 @@ public class Metadata { try { metadataFileChannel.read(magicByteBuffer, 0); } catch (IOException e) { - throw new CTFReaderException( - "Unable to read metadata file channel."); //$NON-NLS-1$ + throw new CTFReaderException("Unable to read metadata file channel."); //$NON-NLS-1$ } /* Get the first int from the file */ @@ -353,8 +351,7 @@ public class Metadata { try { metadataFileChannel.read(payloadByteBuffer); } catch (IOException e) { - throw new CTFReaderException( - "Error reading metadata packet payload."); //$NON-NLS-1$ + throw new CTFReaderException("Error reading metadata packet payload."); //$NON-NLS-1$ } payloadByteBuffer.rewind();