*
* Contributors:
* Matthew Khouzam - Initial API and implementation
+ * Marc-Andre Laperle - Handle BufferOverflowException (Bug 420203)
**********************************************************************/
package org.eclipse.linuxtools.lttng2.ust.core.trace;
+import java.nio.BufferOverflowException;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
try {
temp = new CTFTrace(path);
} catch (CTFReaderException e) {
- status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ return status;
+ } catch (NullPointerException e) {
+ status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
return status;
- } catch (NullPointerException e){
- status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ } catch (final BufferOverflowException e) {
+ status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngUstTrace_TraceReadError + ": " + Messages.LttngUstTrace_MalformedTrace); //$NON-NLS-1$
return status;
}
*/
public static String LttngUstTrace_DomainError;
+ /**
+ * Malformed trace (buffer overflow maybe?)
+ */
+ public static String LttngUstTrace_MalformedTrace;
+
+ /**
+ * Trace read error
+ */
+ public static String LttngUstTrace_TraceReadError;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
###############################################################################
LttngUstTrace_DomainError=Domain mismatch, the environment should be 'ust'.
+LttngUstTrace_MalformedTrace=Buffer overflow exception, trace is malformed
+LttngUstTrace_TraceReadError=Lttng UST trace read error
\ No newline at end of file