new version with WorkingCopy Management
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / builder / ImageBuilderInternalException.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core.builder;
12
13 import org.eclipse.core.runtime.CoreException;
14
15 /**
16  * Exception thrown when there is an internal error in the image builder.
17  * May wrapper another exception.
18  */
19 public class ImageBuilderInternalException extends RuntimeException {
20
21 protected CoreException coreException;
22
23 public ImageBuilderInternalException(CoreException e) {
24         this.coreException = e;
25 }
26
27 public CoreException getThrowable() {
28         return coreException;
29 }
30
31 public void printStackTrace() {
32         if (coreException != null) {
33                 System.err.println(this);
34                 System.err.println("Stack trace of embedded core exception:"); //$NON-NLS-1$
35                 coreException.printStackTrace();
36         } else {
37                 super.printStackTrace();
38         }
39 }
40 }