From a21e7c925d282fc83efdfb92069d955d8b30dbf4 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 19 Jun 2013 10:51:11 +0200 Subject: Gateway.connect should throw ObjectNotFoundException if the user doesn't exist. --- src/main/java/com/c2kernel/process/Gateway.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/c2kernel/process/Gateway.java') diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java index 2bbe638..b393077 100644 --- a/src/main/java/com/c2kernel/process/Gateway.java +++ b/src/main/java/com/c2kernel/process/Gateway.java @@ -256,7 +256,7 @@ public class Gateway * @throws InvalidDataException */ static public AgentProxy connect(String agentName, String agentPassword) - throws InvalidDataException + throws InvalidDataException, ObjectNotFoundException { LDAPProperties ldapProps = new LDAPProperties(); @@ -289,7 +289,7 @@ public class Gateway } catch (ClusterStorageException e) { throw new InvalidDataException(Language.translate("Error initialising storage")+Language.translate(". See log."), ""); } catch (ObjectNotFoundException e) { - throw new InvalidDataException(Language.translate("Invalid username/password"), ""); + throw new ObjectNotFoundException(Language.translate("Invalid username/password"), ""); } catch (Exception e) { throw new InvalidDataException(Language.translate("Could not log in")+": "+Language.translate(e.getMessage()), ""); } -- cgit v1.2.3