Logging an error in case of absent name.

This commit is contained in:
Dmitry Trofimov
2014-03-12 21:25:10 +01:00
parent a33ddd0d4d
commit 8e1582f76e
@@ -1,5 +1,7 @@
package com.intellij.remote;
import com.intellij.openapi.diagnostic.Logger;
/**
* This class denotes the type of the source to obtain remote credentials.
*
@@ -27,11 +29,14 @@ public enum RemoteConnectionType {
*/
NONE;
private static final Logger LOG = Logger.getInstance(RemoteConnectionType.class);
public static RemoteConnectionType findByName(String name) {
try {
return valueOf(name);
}
catch (Exception e) {
LOG.error("Cant find RemoteConnectionType with the name " + name, e);
return NONE;
}
}