Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101781
  • 博文数量: 28
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 295
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-01 22:43
文章分类

全部博文(28)

文章存档

2008年(28)

我的朋友
最近访客

分类:

2008-03-28 11:12:41

查看tomcat 日志控制台
tail -f catalina.out
 

某些程序段可能因为某些原因而出错,但又需要重复执行,比如udp连接的丢包,不能当成exception,而要重新retry:
 

String test = null; int retryCount = 10; while (== null && retryCount > 0) { try { test= dosth(); } catch (Exception ex) { retryCount--; } }

阅读(584) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~