use of org.eclipse.e4.core.services.log.Logger in project eclipse.platform.ui by eclipse-platform.
the class PartRenderingEngine method createGui.
@Override
public Object createGui(final MUIElement element) {
final Object[] gui = { null };
// wrap the handling in a SafeRunner so that exceptions do not prevent
// the renderer from processing other elements
SafeRunner.run(new ISafeRunnable() {
@Override
public void handleException(Throwable e) {
if (e instanceof Error) {
// errors are deadly, we shouldn't ignore these
throw (Error) e;
}
// log exceptions otherwise
if (logger != null) {
// $NON-NLS-1$
String message = "Exception occurred while rendering: {0}";
logger.error(e, NLS.bind(message, element));
}
}
@Override
public void run() throws Exception {
gui[0] = safeCreateGui(element);
}
});
return gui[0];
}
Aggregations