From 5aaf23485fb2ea3487664094a01bd7cdb081e2b2 Mon Sep 17 00:00:00 2001 From: William Bourque Date: Mon, 15 Mar 2010 20:10:37 +0000 Subject: [PATCH] Added better error message in case of a missing library --- .../linuxtools/lttng/jni/factory/JniTraceFactory.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/factory/JniTraceFactory.java b/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/factory/JniTraceFactory.java index cac817c819..75dac8f9fb 100644 --- a/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/factory/JniTraceFactory.java +++ b/org.eclipse.linuxtools.lttng.jni/src/org/eclipse/linuxtools/lttng/jni/factory/JniTraceFactory.java @@ -32,11 +32,18 @@ public class JniTraceFactory { return new JniTrace_v2_3(path); } else { - throw new JniException("ERROR : Unrecognized/unsupported trace version."); + String errMsg = "\nERROR : Unrecognized/unsupported trace version." + + "\nLibrary reported a trace version " + traceVersion.toString() + "." + + "\nMake sure you installed the Lttv library that support this version (look for liblttvtraceread-" + traceVersion.toString() + ".so).\n"; + throw new JniException(errMsg); } } catch (JniTraceVersionException e) { - throw new JniException("ERROR : Call to JniTraceVersion() failed."); + String errMsg = "\nERROR : Call to JniTraceVersion() failed." + + "\nThis usually means that the library (liblttvtraceread_loader.so) could not be found." + + "\nMake sure the LTTv library is installed and that your LD_LIBRARY_PATH is set correctly (see help for more details)\n."; + + throw new JniException(errMsg); } } -- 2.34.1