Java Throwable to String getExceptionStack(final Throwable e)

Here you can find the source of getExceptionStack(final Throwable e)

Description

get Exception Stack

License

Open Source License

Declaration

public static String getExceptionStack(final Throwable e) 

Method Source Code

//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();
    }
}

Related

  1. getExceptionDescription(Throwable e)
  2. getExceptionDetails (final Throwable e)
  3. getExceptionDetails(Throwable throwable)
  4. getExceptionHeadline(Throwable t)
  5. getExceptionPrintout(Throwable aThrowable)
  6. getExceptionStack(Throwable e)
  7. getExceptionStackTrace(Throwable ex)
  8. getExceptionStackTrace(Throwable exception)
  9. getExceptionStackTrace(Throwable exception)