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
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 {
23 public CompilationResult compilationResult;
24 public Throwable exception;
26 public String[] problemArguments, messageArguments;
27 /* special fields used to abort silently (e.g. when cancelling build process) */
28 public boolean isSilent;
29 public RuntimeException silentException;
31 public AbortCompilation() {
33 this((CompilationResult)null);
36 public AbortCompilation(int problemId, String[] problemArguments, String[] messageArguments) {
38 this.problemId = problemId;
39 this.problemArguments = problemArguments;
40 this.messageArguments = messageArguments;
43 public AbortCompilation(CompilationResult compilationResult) {
45 this(compilationResult, null);
48 public AbortCompilation(CompilationResult compilationResult, Throwable exception) {
50 this.compilationResult = compilationResult;
51 this.exception = exception;
54 public AbortCompilation(boolean isSilent, RuntimeException silentException) {
56 this.isSilent = isSilent;
57 this.silentException = silentException;