[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[rap-dev] exception logging on EntryPoint registration
|
Hi RAP folks, after several hours of fiddling with "caught but somehow
not logged" execeptions in my RAP eval project I came across a very
annoying part while debugging into the EntryPoint registration. While
starting my RAP application I only got "An entry point named ''default''
does not exist." Over and over I checked my plugins but could not locate
the reason for that. Finally I stepped into the registration process and
found the cause. A simple UnsupportedClassVersionError set me back 4-5h.
I started with Java 1.6 but had to switch back to Java 1.4 while
development. Of course this could be considered as a beginner's mistake.
;-) But why I didnt see any helpful log message?
EngineConfigWrapper.registerWorkbenchEntryPoint() contains the following
piece of code:
try {
Bundle bundle = Platform.getBundle( contributorName );
Class clazz = bundle.loadClass( className ); // throws exception
EntryPointManager.register( parameter, clazz );
BrandingRegistry.getInstance().bindEntrypoint( id, parameter );
} catch( final Throwable thr ) {
String text = "Could not register entry point ''{0}'' "
+ "with request startup parameter ''{1}''.";
Object[] param = new Object[] { className, parameter };
String msg = MessageFormat.format( text, param );
Status status = new Status( IStatus.ERROR,
contributorName,
IStatus.OK,
msg,
thr );
WorkbenchPlugin.getDefault().getLog().log( status );
}
But where does this "WorkbenchPlugin.getDefault()" logs into? Where can
I find it? Other methods additionally added something like:
// TODO [rst] Added to make errors visible on the console, revise this
System.err.println( msg + " Reason: " + e.getMessage() );
Maybe this could be temporarily added in registerWorkbenchEntryPoint() too?
Im really happy with this finding, because now I can continue my RAP
development. I'm really suprised how easy web development can be using
RAP. So keep up the good work.
Thanks, Lars