Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 Re:这种情况该如何抓异常呢? [Re:mochow]
jameszhang



CJSDN高级会员


发贴: 1594
积分: 111
于 2003-05-07 19:35 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这样写不知可不可以?表达式1、2抛出相同的异常。

void method()
{
...
try{
表达式1;
}catch(Exception ee)
{
throw new MyException("表达式1",1);
}
....

try{
表达式2;
}catch(Exception ee)
{
throw new MyException("表达式2",2);
}
....
....
}

MyException引用前面的类



"First they ignore u, then they laugh at u, then they fight u, then u will win

Mahatma Gandhi"


话题树型展开
人气 标题 作者 字数 发贴时间
10891 这种情况该如何抓异常呢? mochow 66 2003-04-28 16:00
9643 Re:这种情况该如何抓异常呢? mochow 101 2003-04-28 16:02
9979 Re:这种情况该如何抓异常呢? jameszhang 40 2003-04-30 13:55
9515 Re:这种情况该如何抓异常呢? mochow 57 2003-04-30 16:57
9456 Re:这种情况该如何抓异常呢? jiangns3000 1821 2003-04-30 23:55
9383 Re:这种情况该如何抓异常呢? jiangns3000 55 2003-04-30 23:58
9535 Re:这种情况该如何抓异常呢? mochow 684 2003-05-01 21:12
9859 Re:这种情况该如何抓异常呢? jameszhang 588 2003-05-04 18:43
9512 Re:这种情况该如何抓异常呢? mochow 123 2003-05-07 09:11
9827 Re:这种情况该如何抓异常呢? jameszhang 79 2003-05-07 16:47
9461 Re:这种情况该如何抓异常呢? mochow 62 2003-05-07 17:21
9893 Re:这种情况该如何抓异常呢? jameszhang 260 2003-05-07 19:35
9520 Re:这种情况该如何抓异常呢? sharedata 82 2003-04-28 17:44
9367 Re:这种情况该如何抓异常呢? mochow 665 2003-05-08 09:29
9925 Re:这种情况该如何抓异常呢? jameszhang 306 2003-05-08 15:06
9449 Re:这种情况该如何抓异常呢? sharedata 77 2003-04-28 17:46
9472 Re:这种情况该如何抓异常呢? floater 290 2003-04-28 23:23
9546 Re:这种情况该如何抓异常呢? mochow 440 2003-04-29 11:00
9500 Re:这种情况该如何抓异常呢? floater 1283 2003-04-29 11:23
9575 Re:这种情况该如何抓异常呢? mochow 60 2003-04-29 12:00
9391 Re:这种情况该如何抓异常呢? ppxstar 98 2003-04-29 17:44
9652 Re:这种情况该如何抓异常呢? mochow 223 2003-04-30 09:11

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923