FirelyTeam / firely-cql-sdk

BSD 3-Clause "New" or "Revised" License
30 stars 17 forks source link

Use Maybe or ErrorOr monad for return parameters for methods TypeFor, ChangeType, etc #578

Open baseTwo opened 2 months ago

baseTwo commented 2 months ago

A lot of methods in the code base change behavior based on a throwError parameter, either returning a valid value, or null/throw exception based on that parameter.

Replace these return types with an ErrorOr result, which allows the caller to check if there was an error or valid value and take the appropriate action based on that.