Throwing exceptions from records

Alex Buckley alex.buckley at oracle.com
Thu Mar 5 17:16:47 UTC 2020


Per JEP 359, the list for record-related discussion is amber-dev. 
bcc'ing jdk-dev off this thread.

On 3/5/2020 9:12 AM, Ty Young wrote:
> Hi,
> 
> 
> Is there a way in JDK 14 records to throw exceptions from a constructor? 
> Currently I have dozens of classes that I want to convert to records but 
> am unable to due to there being no way to have a constructor that throws 
> exceptions. I'm not able to find any examples of how records and 
> exceptions are supposed to work together online either...


More information about the amber-dev mailing list