-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:experimentalarea:saferExceptionsscala.language.experimental.saferExceptionsscala.language.experimental.saferExceptionsitype:enhancement
Description
One problem with the saferException scheme is that so far each CanThrow
capability has to be passed separately. It's not yet possible to bunch several exceptions in a single CanThrow
capability.
It looks like we could use dependency injection scheme explained here and here to aggregate CanThrow
. Using this scheme, a capability to enable throwing an IOException
and an SQLExcecption
would be
CanThrow[(IoException, SQLException)]
The discussion on dependency injection shows why &
would not work for aggregating exceptions (it would lead to given search ambiguities) but tupling is a good alternative.
Metadata
Metadata
Assignees
Labels
area:experimentalarea:saferExceptionsscala.language.experimental.saferExceptionsscala.language.experimental.saferExceptionsitype:enhancement