1 /*******************************************************************************
 
   2  * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
 
   3  * All rights reserved. This program and the accompanying materials 
 
   4  * are made available under the terms of the Common Public License v0.5 
 
   5  * which accompanies this distribution, and is available at
 
   6  * http://www.eclipse.org/legal/cpl-v05.html
 
   9  *     IBM Corporation - initial API and implementation
 
  10  ******************************************************************************/
 
  11 package net.sourceforge.phpdt.internal.compiler.problem;
 
  13 import net.sourceforge.phpdt.internal.compiler.CompilationResult;
 
  16  * Special unchecked exception type used 
 
  17  * to abort from the compilation process
 
  19  * should only be thrown from within problem handlers.
 
  21 public class AbortCompilation extends RuntimeException {
 
  22         public CompilationResult compilationResult;
 
  23         public Throwable exception;
 
  26         public String[] problemArguments;
 
  28         /* special fields used to abort silently (e.g. when cancelling build process) */
 
  29         public boolean isSilent;
 
  30         public RuntimeException silentException;
 
  31 public AbortCompilation() {
 
  32         this((CompilationResult)null);
 
  34 public AbortCompilation(int problemId, String[] problemArguments) {
 
  36         this.problemId = problemId;
 
  37         this.problemArguments = problemArguments;
 
  39 public AbortCompilation(CompilationResult compilationResult) {
 
  40         this(compilationResult, null);
 
  42 public AbortCompilation(CompilationResult compilationResult, Throwable exception) {
 
  43         this.compilationResult = compilationResult;
 
  44         this.exception = exception;
 
  46 public AbortCompilation(boolean isSilent, RuntimeException silentException) {
 
  47         this.isSilent = isSilent;
 
  48         this.silentException = silentException;