Created
May 17, 2017 03:35
-
-
Save houdq/5a895c984b1286c06fe894f318eb5d39 to your computer and use it in GitHub Desktop.
筛选异常
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.org.apache.xml.internal.utils.StopParseException | |
import java.lang.reflect.UndeclaredThrowableException | |
class ThirdException extends Exception { | |
public ThirdException(String msg) { | |
super(msg) | |
} | |
} | |
try { | |
a == 1 | |
if (1) | |
throw new ThirdException("dd") | |
} | |
catch (Exception ex) { | |
if (ex.class == ThirdException) { | |
println(ex) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment