new version with WorkingCopy Management
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / problem / AbortCompilation.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.compiler.problem;
12
13 import net.sourceforge.phpdt.internal.compiler.CompilationResult;
14
15 /*
16  * Special unchecked exception type used 
17  * to abort from the compilation process
18  *
19  * should only be thrown from within problem handlers.
20  */
21 public class AbortCompilation extends RuntimeException {
22
23         public CompilationResult compilationResult;
24         public Throwable exception;
25         public int problemId; 
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;
30
31         public AbortCompilation() {
32
33                 this((CompilationResult)null);
34         }
35
36         public AbortCompilation(int problemId, String[] problemArguments, String[] messageArguments) {
37         
38                 this.problemId = problemId;
39                 this.problemArguments = problemArguments;
40                 this.messageArguments = messageArguments;
41         }
42
43         public AbortCompilation(CompilationResult compilationResult) {
44
45                 this(compilationResult, null);
46         }
47
48         public AbortCompilation(CompilationResult compilationResult, Throwable exception) {
49
50                 this.compilationResult = compilationResult;
51                 this.exception = exception;
52         }
53
54         public AbortCompilation(boolean isSilent, RuntimeException silentException) {
55
56                 this.isSilent = isSilent;
57                 this.silentException = silentException;
58         }
59 }