01: /*
02: * Bytecode Analysis Framework
03: * Copyright (C) 2003,2004 University of Maryland
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19:
20: package edu.umd.cs.findbugs.ba;
21:
22: import org.apache.bcel.generic.InstructionHandle;
23: import org.apache.bcel.generic.MethodGen;
24:
25: import edu.umd.cs.findbugs.classfile.CheckedAnalysisException;
26:
27: /**
28: * Exception type to indicate a dataflow analysis failure.
29: *
30: * @see Dataflow
31: * @see DataflowAnalysis
32: */
33: public class DataflowAnalysisException extends CheckedAnalysisException {
34: private static final long serialVersionUID = 3690480212240446258L;
35:
36: /**
37: * Constructor.
38: */
39: public DataflowAnalysisException() {
40: }
41:
42: /**
43: * Constructor.
44: *
45: * @param msg message describing the reason for the exception
46: */
47: public DataflowAnalysisException(String msg) {
48: super (msg);
49: }
50:
51: /**
52: * Constructor from message and another Throwable object.
53: *
54: * @param msg message describing the reason for the exception
55: * @param cause a Throwable which is the cause of the exception
56: */
57: public DataflowAnalysisException(String msg, Throwable cause) {
58: super (msg, cause);
59: }
60:
61: /**
62: * Constructor from method and instruction.
63: *
64: * @param message reason for the error
65: * @param methodGen the method
66: * @param handle the instruction
67: */
68: public DataflowAnalysisException(String message,
69: MethodGen methodGen, InstructionHandle handle) {
70: super (message + " in "
71: + SignatureConverter.convertMethodSignature(methodGen)
72: + " at " + handle);
73: }
74:
75: /**
76: * Constructor from message, method and instruction, and Throwable object (cause).
77: *
78: * @param message reason for the error
79: * @param methodGen the method
80: * @param handle the instruction
81: * @param cause a Throwable which is the cause of the exception
82: */
83: public DataflowAnalysisException(String message,
84: MethodGen methodGen, InstructionHandle handle,
85: Throwable cause) {
86: this (message, methodGen, handle);
87: this .initCause(cause);
88: }
89: }
90:
91: // vim:ts=4
|