add throws clauses to Java APIs
This commit is contained in:
parent
bf49b75d5e
commit
e3ac633649
3 changed files with 5 additions and 3 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue