mirror of https://github.com/mchr3k/org.intrace
Fix exception handling
This commit is contained in:
parent
ac57fa2135
commit
303dd9a6e6
Binary file not shown.
|
|
@ -23,15 +23,22 @@ public class TraceClientLoader
|
|||
Method main = c.getMethod("main", new Class[]{args.getClass()});
|
||||
main.invoke((Object)null, new Object[]{args});
|
||||
}
|
||||
catch (UnsatisfiedLinkError ex)
|
||||
catch (InvocationTargetException ex)
|
||||
{
|
||||
System.err.println("Launch failed (UnsatisfiedLinkError), try other bitness");
|
||||
cl = getSWTClassloader(true);
|
||||
Thread.currentThread().setContextClassLoader(cl);
|
||||
System.err.println("Launching InTrace UI");
|
||||
Class<?> c = Class.forName("org.intrace.client.gui.TraceClient", true, cl);
|
||||
Method main = c.getMethod("main", new Class[]{args.getClass()});
|
||||
main.invoke((Object)null, new Object[]{args});
|
||||
if (ex.getCause() instanceof UnsatisfiedLinkError)
|
||||
{
|
||||
System.err.println("Launch failed (UnsatisfiedLinkError), try other bitness");
|
||||
cl = getSWTClassloader(true);
|
||||
Thread.currentThread().setContextClassLoader(cl);
|
||||
System.err.println("Launching InTrace UI");
|
||||
Class<?> c = Class.forName("org.intrace.client.gui.TraceClient", true, cl);
|
||||
Method main = c.getMethod("main", new Class[]{args.getClass()});
|
||||
main.invoke((Object)null, new Object[]{args});
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ClassNotFoundException ex)
|
||||
|
|
|
|||
Loading…
Reference in New Issue