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.core.util;
11:
12: /**
13: * Exception thrown by a class file reader when encountering a error in decoding
14: * information contained in a .class file.
15: *
16: * @since 2.0
17: */
18: public class ClassFormatException extends Exception {
19:
20: public static final int ERROR_MALFORMED_UTF8 = 1;
21: public static final int ERROR_TRUNCATED_INPUT = 2;
22: public static final int INVALID_CONSTANT_POOL_ENTRY = 3;
23: public static final int TOO_MANY_BYTES = 4;
24: public static final int INVALID_ARGUMENTS_FOR_INVOKEINTERFACE = 5;
25: public static final int INVALID_BYTECODE = 6;
26:
27: /**
28: * @since 3.0
29: */
30: public static final int INVALID_TAG_CONSTANT = 7;
31:
32: /**
33: * @since 3.0
34: */
35: public static final int INVALID_MAGIC_NUMBER = 8;
36:
37: private static final long serialVersionUID = 6582900558320612988L; // backward compatible
38:
39: /**
40: * Constructor for ClassFormatException.
41: * @param errorID the given error ID
42: */
43: public ClassFormatException(int errorID) {
44: // TODO (olivier) what is the errorID?
45: }
46:
47: /**
48: * Constructor for ClassFormatException.
49: * @param message the message for the exception
50: */
51: public ClassFormatException(String message) {
52: super(message);
53: }
54: }
|