Here you can find the source of getExceptionStack(final Throwable e)
public static String getExceptionStack(final Throwable e)
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 www.isandlatech.com (www.isandlatech.com) * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w ww . j a v a 2s. c om*/ * ogattaz (isandlaTech) - initial API and implementation *******************************************************************************/ public class Main { public static String getExceptionStack(final Throwable e) { java.io.StringWriter wSW = new java.io.StringWriter(); e.printStackTrace(new java.io.PrintWriter(wSW)); return wSW.toString(); } }