---
title: "异常信息打印"
author: "lversam"
date: "2012-04-14T11:25:41Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2012-04-14T11:25:41Z"
id: 1485853
url: "https://lversam.iteye.com/blog/1485853"
---

```
try
                {
                //调用业务，略
                }
                catch (Exception e)
                {
                 	System.out.println("抛出异常");
                 	if(e instanceof SystemException)
                 	{
                 		SystemException ex =(SystemException)e;
                 		System.out.println("errorcode>>>>"+ex.getErrorCode());
                 	}
                	e.printStackTrace();
                }
```