Throwing exceptions from records

Ty Young youngty1997 at gmail.com
Thu Mar 5 17:12:59 UTC 2020


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 jdk-dev mailing list