package com.bjpowernode.struts;
public class UserManager {
public void login(String username, String password) {
if (!"admin".equals(username)) {
throw new UserNotFoundException();
}
if (!"admin".equals(password)) {
throw new PasswordErrorException();
}
}
}
package com.bjpowernode.struts;
public class UserManager {
public void login(String username, String password) {
if (!"admin".equals(username)) {
throw new UserNotFoundException();
}
if (!"admin".equals(password)) {
throw new PasswordErrorException();
}
}
}
package com.bjpowernode.struts;
public class PasswordErrorException extends RuntimeException {
public PasswordErrorException() {
// TODO Auto-generated constructor stub
}
public PasswordErrorException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public PasswordErrorException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
public PasswordErrorException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
}