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 {
25 private static final long serialVersionUID = -3674083924553307963L;
27 public CompilationResult compilationResult;
29 public Throwable exception;
33 public String[] problemArguments, messageArguments;
36 * special fields used to abort silently (e.g. when cancelling build
39 public boolean isSilent;
41 public RuntimeException silentException;
43 public AbortCompilation() {
45 this((CompilationResult) null);
48 public AbortCompilation(int problemId, String[] problemArguments,
49 String[] messageArguments) {
51 this.problemId = problemId;
52 this.problemArguments = problemArguments;
53 this.messageArguments = messageArguments;
56 public AbortCompilation(CompilationResult compilationResult) {
58 this(compilationResult, null);
61 public AbortCompilation(CompilationResult compilationResult,
62 Throwable exception) {
64 this.compilationResult = compilationResult;
65 this.exception = exception;
68 public AbortCompilation(boolean isSilent, RuntimeException silentException) {
70 this.isSilent = isSilent;
71 this.silentException = silentException;