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 to abort from the compilation process
18 * should only be thrown from within problem handlers.
20 public class AbortCompilation extends RuntimeException {
22 public CompilationResult compilationResult;
24 public Throwable exception;
28 public String[] problemArguments, messageArguments;
31 * special fields used to abort silently (e.g. when cancelling build
34 public boolean isSilent;
36 public RuntimeException silentException;
38 public AbortCompilation() {
40 this((CompilationResult) null);
43 public AbortCompilation(int problemId, String[] problemArguments,
44 String[] messageArguments) {
46 this.problemId = problemId;
47 this.problemArguments = problemArguments;
48 this.messageArguments = messageArguments;
51 public AbortCompilation(CompilationResult compilationResult) {
53 this(compilationResult, null);
56 public AbortCompilation(CompilationResult compilationResult,
57 Throwable exception) {
59 this.compilationResult = compilationResult;
60 this.exception = exception;
63 public AbortCompilation(boolean isSilent, RuntimeException silentException) {
65 this.isSilent = isSilent;
66 this.silentException = silentException;