Esse commit está contido em:
Matthew Horridge
2015-03-20 10:39:24 -07:00
commit d4de29e0a5
2 arquivos alterados com 16 adições e 0 exclusões
@@ -171,6 +171,9 @@ public class PluginRegistryImpl implements PluginRegistry {
readRegistry(node);
}
catch (UpdateException e){
if (e.getPluginId().isPresent()) {
logger.info(String.format("Couldn't read plugin updated file [%s].", e.getMessage()));
}
readRegistry(node);
}
catch(IOException e){
@@ -1,5 +1,7 @@
package org.protege.editor.core.update;
import com.google.common.base.Optional;
import java.net.URL;
/*
* Copyright (C) 2007, University of Manchester
@@ -22,7 +24,18 @@ public class UpdateException extends Exception{
*/
private static final long serialVersionUID = -6812551693275528899L;
private final Optional<String> pluginId;
public UpdateException(String id, URL url, String message) {
super(id + ": problem with update file (" + url + "). " + message);
this.pluginId = Optional.fromNullable(id);
}
/**
* Gets the plugin Id.
* @return The plugin id. Not {@code null}, but may not be present.
*/
public Optional<String> getPluginId() {
return pluginId;
}
}