Here you can find the source of stacktraceError(Throwable e)
Parameter | Description |
---|---|
e | Exception object |
private static String stacktraceError(Throwable e)
//package com.java2s; /*!// w w w . j a v a 2 s . c o m * @(#) Hibernate Helper v2.1.0 * https://github.com/diegoguevara/HibernateGenericDao * * Hibernate Helper implemantation * * Copyright 2012, Diego Guevara * Released under dual licensed under the MIT or GPL Version 2 licenses. * * Creation Date: Jun.2010 * Update Date : Apr.2012 */ import java.io.PrintWriter; import java.io.StringWriter; public class Main { /** * Generate a string with all stacktrace error * @param e Exception object * @return String */ private static String stacktraceError(Throwable e) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); e.printStackTrace(pw); return sw.toString(); } }