add throws clauses to Java APIs

This commit is contained in:
Roland 2012-08-09 18:15:38 +02:00
parent bf49b75d5e
commit e3ac633649
3 changed files with 5 additions and 3 deletions

View file

@ -93,6 +93,7 @@ object JavaPartialFunction {
abstract class JavaPartialFunction[A, B] extends AbstractPartialFunction[A, B] {
import JavaPartialFunction._
@throws(classOf[Exception])
def apply(x: A, isCheck: Boolean): B
final def isDefinedAt(x: A): Boolean = try { apply(x, true); true } catch { case NoMatch false }