/plugins/AntFarm/tags/antfarm-1-5/plugin/integration/jEditException.java
# · Java · 96 lines · 32 code · 15 blank · 49 comment · 2 complexity · 15a628a5307093ff27db3200c76a1960 MD5 · raw file
- /*
- * jEditException.java - Plugin for running Ant builds from jEdit.
- * Copyright (C) 2001 Brian Knowles
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
- package plugin.integration;
- import java.io.*;
- /**
- * An exception for jEdit errors.
- *
- * @author steinbeck
- * @created 27. August 2001
- */
- public class jEditException
- extends Exception
- {
- private Throwable nestedException;
- /**
- * Create a new <code>jEditException</code>.
- *
- * @param msg Description of Parameter
- */
- public jEditException( String msg )
- {
- super( msg );
- }
- /**
- * Create a new <code>jEditException</code>.
- *
- * @param msg Description of Parameter
- * @param t Description of Parameter
- */
- public jEditException( String msg, Throwable t )
- {
- super( msg );
- nestedException = t;
- }
- /**
- * Prints this stack trace to standard error.
- */
- public void printStackTrace()
- {
- printStackTrace( System.err );
- }
- /**
- * Prints the stack trace to the given <code>PrintWriter</code>.
- *
- * @param writer Description of Parameter
- */
- public void printStackTrace( PrintWriter writer )
- {
- super.printStackTrace( writer );
- if ( null != nestedException ) {
- writer.println( "Nested Exception:" );
- nestedException.printStackTrace( writer );
- }
- }
- /**
- * Prints this <code>Throwable</code> and its backtrace to a given <code>PrintStream</code>
- * .
- *
- * @param stream Description of Parameter
- */
- public void printStackTrace( PrintStream stream )
- {
- printStackTrace( new PrintWriter( stream, true ) );
- }
- }