1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.html
9 * IBM Corporation - initial API and implementation
10 ******************************************************************************/
11 package net.sourceforge.phpdt.internal.compiler.classfmt;
13 public class ClassFormatException extends Exception {
14 private int errorCode;
15 private int bufferPosition;
17 public static final int ErrBadMagic = 1;
18 public static final int ErrBadMinorVersion = 2;
19 public static final int ErrBadMajorVersion = 3;
21 public static final int ErrBadConstantClass= 4;
22 public static final int ErrBadConstantString= 5;
23 public static final int ErrBadConstantNameAndType = 6;
24 public static final int ErrBadConstantFieldRef= 7;
25 public static final int ErrBadConstantMethodRef = 8;
26 public static final int ErrBadConstantInterfaceMethodRef = 9;
27 public static final int ErrBadConstantPoolIndex = 10;
28 public static final int ErrBadSuperclassName = 11;
29 public static final int ErrInterfaceCannotBeFinal = 12;
30 public static final int ErrInterfaceMustBeAbstract = 13;
31 public static final int ErrBadModifiers = 14;
32 public static final int ErrClassCannotBeAbstractFinal = 15;
33 public static final int ErrBadClassname = 16;
34 public static final int ErrBadFieldInfo = 17;
35 public static final int ErrBadMethodInfo = 17;
37 public static final int ErrEmptyConstantPool =18;
38 public static final int ErrMalformedUtf8 = 19;
39 public static final int ErrUnknownConstantTag = 20;
40 public static final int ErrTruncatedInput = 21;
41 public static final int ErrMethodMustBeAbstract = 22;
42 public static final int ErrMalformedAttribute = 23;
43 public static final int ErrBadInterface = 24;
44 public static final int ErrInterfaceMustSubclassObject = 25;
45 public static final int ErrIncorrectInterfaceMethods = 26;
46 public static final int ErrInvalidMethodName = 27;
47 public static final int ErrInvalidMethodSignature = 28;
49 public ClassFormatException(int code) {
52 public ClassFormatException(int code, int bufPos) {
54 bufferPosition = bufPos;
59 public int getErrorCode() {