diff options
author | Teddy <ted.sybil@gmail.com> | 2013-09-01 23:50:13 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-09-01 23:50:13 +0800 |
commit | e13b38f847050b4ff93bf111104a927a0f2d57b5 (patch) | |
tree | 10e50dd003f6deaee446250d10fa50d4ed9863fc /client/Piztor/src/com/macaroon/piztor/UpdateInfo.java | |
parent | 4be449207cd12831a1858860eba1c8bb0618aa80 (diff) | |
parent | 2f6cb801f2374fd6ded925fb1438d6ce72837d81 (diff) |
Merge branch 'master' of github.com:Determinant/piztor
Diffstat (limited to 'client/Piztor/src/com/macaroon/piztor/UpdateInfo.java')
-rw-r--r-- | client/Piztor/src/com/macaroon/piztor/UpdateInfo.java | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/client/Piztor/src/com/macaroon/piztor/UpdateInfo.java b/client/Piztor/src/com/macaroon/piztor/UpdateInfo.java index 66ead66..cd428f7 100644 --- a/client/Piztor/src/com/macaroon/piztor/UpdateInfo.java +++ b/client/Piztor/src/com/macaroon/piztor/UpdateInfo.java @@ -68,22 +68,16 @@ public class UpdateInfo extends PiztorAct { break; case Res.SetPassword: ResSetPassword res = (ResSetPassword) m.obj; - switch (res.type) { - case 0: - out.receiveMessage("修改成功,请重新登录"); - out.appMgr.trigger(AppMgr.logout); - break; - case 1: - out.appMgr.trigger(AppMgr.logout); - break; - case 3: - out.receiveMessage("密码错误"); - default: - break; - } + out.receiveMessage("修改成功,请重新登录"); + out.appMgr.trigger(AppMgr.logout); break; case -1: - out.appMgr.trigger(AppMgr.logout); + EException eException = (EException) m.obj; + if (eException.Etype == EException.EPasswordFailedException) + out.receiveMessage("密码错误"); + else { + out.appMgr.trigger(AppMgr.logout); + } break; default: break; |