In looking at the constructor for @throws
, it takes a single Class[_]
argument. Taking that into consideration, you won't be able to use the array notation to represent multiple classes. So the alternative it to add the annotation multiple times, one for each supported exception:
@throws( classOf[ExceptionA] )
@throws( classOf[ExceptionB] )