Java Stacktrace Print printStackTrace(Throwable throwable)

Here you can find the source of printStackTrace(Throwable throwable)

Description

Prints the given stacktrace

License

Open Source License

Parameter

Parameter Description
throwable The exception to print

Declaration

public static void printStackTrace(Throwable throwable) 

Method Source Code

//package com.java2s;
/**/*from  www.  j  a v  a  2  s  .com*/
 * This class is the core Single Player Commands class. It handles all input and controls all
 * output
 * 
 * @author simo_415 Copyright (C) 2010-2012 simo_415 - (http://bit.ly/spcmod)
 * 
 *         This file is part of Single Player Commands.
 * 
 *         Single Player Commands is free software: you can redistribute it and/or modify it under
 *         the terms of the GNU Lesser General Public License as published by the Free Software
 *         Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 *         Single Player Commands is distributed in the hope that it will be useful, but WITHOUT ANY
 *         WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 *         PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 * 
 *         You should have received a copy of the GNU Lesser General Public License along with
 *         Single Player Commands. If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    public static boolean DEBUG = false;

    /**
     * Prints the given stacktrace
     * 
     * @param throwable The exception to print
     */
    public static void printStackTrace(Throwable throwable) {
        if (DEBUG) {
            throwable.printStackTrace();
        }
    }
}

Related

  1. printStackTrace(Throwable e)
  2. printStackTrace(Throwable exception)
  3. printStackTrace(Throwable t)
  4. printStackTrace(Throwable t)
  5. printStackTrace(Throwable t)
  6. printStackTrace(Throwable throwable)
  7. printStackTraceAsHtml(Throwable t)
  8. printStackTraceElement(StackTraceElement element, StringBuilder buffer)
  9. printStackTraceHTML(Throwable e)