LogicException
$Author: bel70 $
$Revision: 1.1 $
4748495051525354
notNull(getLoginUser(), "登录超时"); } protected void ensureLoginPage() throws SQLException { if (getLoginUser() == null) { throw new LogicException(new RedirectResult("/login.html")); } }
89101112131415
public class BaseAction extends wbbs.web.BaseAction { public void ensureLoginAction() throws SQLException { super.ensureLoginAction(); if (!loginUser.id.equals("admin")) { throw new LogicException(err("请登录")); } }
1516171819202122
} public void ensureLoginPage() throws SQLException { super.ensureLoginPage(); if (!loginUser.id.equals("admin")) { throw new LogicException(new RedirectResult("/login.html")); } }
919293949596979899100101
pForm.setPassword2(user.getName()); dao.addUser(pForm); user = dao.getUser(pForm.getLogin(), pForm.getPassword()); if (user.getStatus() == UserStatus.GUEST) { session.setAttribute(IConst.SESSION.USER_KEY, user); throw new LogicException(getResources(request).getMessage( "errors.ERR22") + user.getName()); } user.setIp(request.getRemoteAddr()); forward=IConst.TOKEN.WELCOME;
60616263646566
return new AnnotatedNounPartImpl(np, label); } } } throw new LogicException("Should not unravel with collection unraveller !" + to); }
91929394959697
} else if ((to instanceof Class<?>) && (((Class<?>) to).isArray())) { NounPart np = generateNoun(((Class<?>) to).getComponentType(), a); return new AnnotatedNounPartImpl(np, "array of "); } throw new LogicException("Should not unravel with array unraveller !" + to); }
7576777879808182
} in.close(); out.close(); } } catch (IOException e) { throw new LogicException("Couldn't copy dir!"); } }
113114115116117118119120
try { FileWriter fw = new FileWriter(f); fw.write(contents); fw.close(); } catch (IOException e) { throw new LogicException("Could not save output: " + f.toString(), e); } }
122123124125126127128129
public static void renderToFile(Class<?> theTest, String subtest, String item, BufferedImage bi) { File f = prepareFileName(theTest, subtest, item); try { ImageIO.write(bi, "PNG", f); } catch (IOException e) { throw new LogicException("Could not save output: " + f.toString(), e); } }
200201202203204205206207208209210
} return new String[] { fromid, toid, "", "", "" }; } throw new LogicException("Type not connected: "+o); } public String[] getHeaders() { return new String[] { "From ID", "To ID", "Length", "Turns", "Crosses"}; }