src/share/classes/jdk/internal/org/objectweb/asm/tree/analysis/AnalyzerException.java

Print this page




  49  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  50  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  51  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  52  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 package jdk.internal.org.objectweb.asm.tree.analysis;
  60 
  61 import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
  62 
  63 /**
  64  * Thrown if a problem occurs during the analysis of a method.
  65  *
  66  * @author Bing Ran
  67  * @author Eric Bruneton
  68  */

  69 public class AnalyzerException extends Exception {
  70 
  71     public final AbstractInsnNode node;
  72 
  73     public AnalyzerException(final AbstractInsnNode node, final String msg) {
  74         super(msg);
  75         this.node = node;
  76     }
  77 
  78     public AnalyzerException(final AbstractInsnNode node, final String msg,
  79             final Throwable exception) {
  80         super(msg, exception);
  81         this.node = node;
  82     }
  83 
  84     public AnalyzerException(final AbstractInsnNode node, final String msg,
  85             final Object expected, final Value encountered) {
  86         super((msg == null ? "Expected " : msg + ": expected ") + expected
  87                 + ", but found " + encountered);
  88         this.node = node;


  49  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  50  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  51  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  52  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  53  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  54  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  55  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  56  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  57  * THE POSSIBILITY OF SUCH DAMAGE.
  58  */
  59 package jdk.internal.org.objectweb.asm.tree.analysis;
  60 
  61 import jdk.internal.org.objectweb.asm.tree.AbstractInsnNode;
  62 
  63 /**
  64  * Thrown if a problem occurs during the analysis of a method.
  65  *
  66  * @author Bing Ran
  67  * @author Eric Bruneton
  68  */
  69 @SuppressWarnings("serial") // JDK-implementation class
  70 public class AnalyzerException extends Exception {
  71 
  72     public final AbstractInsnNode node;
  73 
  74     public AnalyzerException(final AbstractInsnNode node, final String msg) {
  75         super(msg);
  76         this.node = node;
  77     }
  78 
  79     public AnalyzerException(final AbstractInsnNode node, final String msg,
  80             final Throwable exception) {
  81         super(msg, exception);
  82         this.node = node;
  83     }
  84 
  85     public AnalyzerException(final AbstractInsnNode node, final String msg,
  86             final Object expected, final Value encountered) {
  87         super((msg == null ? "Expected " : msg + ": expected ") + expected
  88                 + ", but found " + encountered);
  89         this.node = node;