Here you can find the source of getExceptionString(Throwable t)
Parameter | Description |
---|---|
t | a parameter |
public static String getExceptionString(Throwable t)
//package com.java2s; /*//from www .j av a 2s . c o m * Copyright (c) Fiorano Software Pte. Ltd. and affiliates. All rights reserved. http://www.fiorano.com * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ import java.io.*; public class Main { /** * Returns exception string for class * * @param t * @return */ public static String getExceptionString(Throwable t) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); return sw.toString(); } }