LocalJBossBehaviorDelegate#canChangeState swallows an Exception can would occur when getting the jboss runtime for a given server:
public IStatus canChangeState(String launchMode) { try { if( getServer() != null && getServer().getRuntime() != null && RuntimeUtils.checkedGetJBossServerRuntime(getServer()).getVM() != null ) return Status.OK_STATUS; } catch(Exception e) { // ignore } return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, MessageFormat.format(Messages.ServerHasNoRuntime, getServer().getName())); }
RuntimeUtils#checkedGetJBossServerRuntime throws a CoreException if fetching failed. We should not swallow this exception but return it instead of a general purpose error status.
- blocks
-
JBIDE-9016 Review error handling code in as plugins
- Closed