exceptionhandling.java

来自「JAVA 语言的函数式编程扩展」· Java 代码 · 共 27 行

JAVA
27
字号
/*                     __                                               *\**     ________ ___   / /  ___     Scala API                            ****    / __/ __// _ | / /  / _ |    (c) 2002-2007, LAMP/EPFL             ****  __\ \/ /__/ __ |/ /__/ __ |    http://scala-lang.org/               **** /____/\___/_/ |_/____/_/ | |                                         ****                          |/                                          **\*                                                                      */// $Id: ExceptionHandling.java 10895 2007-05-01 09:13:46Z michelou $package scala.runtime;public abstract class ExceptionHandling {  public static Throwable tryCatch(Runnable runnable) {    try {      runnable.run();      return null;    } catch (Throwable exception) {      return exception;    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?