---
title: "Myeclipse的tyry catch 怎么让它自动生成"
author: "netxdiy"
date: "2011-03-21T19:58:22Z"
tags: []
categories: ["企业架构"]
slug: "myeclipse-tyry-catch"
draft: false
lastmod: "2011-03-21T19:58:22Z"
id: 969803
url: "https://netxdiy.iteye.com/blog/969803"
---

```
方法1：选择代码段，右键单击，选择Surround With->6 try(try catch block);
方法2：如果是必须要捕捉的异常，eclipse会自动提示错误，点击左边那把"x"，选择对应的选项即可。
```