001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * https://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.bcel.verifier.exc; 020 021import org.apache.commons.lang3.exception.ExceptionUtils; 022 023/** 024 * A utility class providing convenience methods concerning Throwable instances. 025 * 026 * @see Throwable 027 */ 028public final class Utility { 029 030 /** 031 * This method returns the stack trace of a Throwable instance as a String. 032 * 033 * @param t The Throwable instance. 034 * @return The stack trace as a String. 035 * @deprecated Use {@link ExceptionUtils#getStackTrace(Throwable)}. 036 */ 037 public static String getStackTrace(final Throwable t) { 038 return ExceptionUtils.getStackTrace(t); 039 } 040 041 /** This class is not instantiable. */ 042 private Utility() { 043 } 044}