01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.compiler.problem;
11:
12: import java.io.IOException;
13:
14: import org.eclipse.jdt.core.compiler.CategorizedProblem;
15: import org.eclipse.jdt.internal.compiler.CompilationResult;
16:
17: /*
18: * Special unchecked exception type used
19: * to abort from the compilation process
20: *
21: * should only be thrown from within problem handlers.
22: */
23: public class AbortCompilationUnit extends AbortCompilation {
24:
25: private static final long serialVersionUID = -4253893529982226734L; // backward compatible
26:
27: public String encoding;
28:
29: public AbortCompilationUnit(CompilationResult compilationResult,
30: CategorizedProblem problem) {
31: super (compilationResult, problem);
32: }
33:
34: /**
35: * Used to surface encoding issues when reading sources
36: */
37: public AbortCompilationUnit(CompilationResult compilationResult,
38: IOException exception, String encoding) {
39: super(compilationResult, exception);
40: this.encoding = encoding;
41: }
42: }
|