com.github.andyshao.util.stream.ThrowableException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Gear Show documentation
Show all versions of Gear Show documentation
Enhance and formating the coding of JDK
The newest version!
package com.github.andyshao.util.stream;
import java.io.Serial;
/**
*
*
* Title:
* Descript:
* Copyright: Copryright(c) May 27, 2019
* Encoding: UNIX UTF-8
*
* @author Andy.Shao
* @deprecated unnecessary
*
*/
@Deprecated(since = "5.0.0.RELEASE")
public class ThrowableException extends Exception {
@Serial
private static final long serialVersionUID = 3780569937997515984L;
/**
* with exception
* @param e previous exception
*/
public ThrowableException(Throwable e) {
super(e);
}
/**
* convert to exception if e is the {@link Exception}
* @param e {@link Throwable}
* @return {@link Exception}
*/
public static Exception convertToException(Throwable e) {
if(e instanceof Exception) return (Exception)e;
return new ThrowableException(e);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy