lttng.ust: Catch TimeRangeException in UstDebugInfoAnalysisModule
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 13 Jul 2016 19:09:45 +0000 (15:09 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 13 Jul 2016 20:06:57 +0000 (16:06 -0400)
This exception may happen if the statesystem was not fully built
due to using pre-release traces that do not have all the
expected event fields.

Since there are such traces out in the wild, this situation can
happen sometimes.

Bug: 497863

Change-Id: Id8c14e36f9dcfe1858628f96298ed3959c0a58f5
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/77263
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-by: Hudson CI
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java

index ca83c6ceb854ef99a5754beea2b12a508637d998..dad1258a4077d3706e5a377aaae9e3636edf48cc 100644 (file)
@@ -26,6 +26,7 @@ import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
 import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
 import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
 import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
 import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue;
 import org.eclipse.tracecompass.tmf.core.analysis.requirements.TmfAbstractAnalysisRequirement;
@@ -168,7 +169,7 @@ public class UstDebugInfoAnalysisModule extends TmfStateSystemAnalysisModule {
             }
         } catch (AttributeNotFoundException e) {
             throw new IllegalStateException(e);
-        } catch (StateSystemDisposedException e) {
+        } catch (TimeRangeException | StateSystemDisposedException e) {
             /* Oh well, such is life. */
         }
         return files;
@@ -255,7 +256,7 @@ public class UstDebugInfoAnalysisModule extends TmfStateSystemAnalysisModule {
             // TODO: that's probably not true anymore
             /* We're only using quarks we've checked for. */
             throw new IllegalStateException(e);
-        } catch (StateSystemDisposedException e) {
+        } catch (TimeRangeException | StateSystemDisposedException e) {
             return null;
         }
     }
This page took 0.024894 seconds and 5 git commands to generate.