Craig
02/24/2021, 1:59 AMMarc Reicher
02/24/2021, 2:09 AMmichoel
02/24/2021, 2:55 AMnull
(not false) if the transform failedstalbert
02/24/2021, 3:08 AMMaybe<TransformedRecordType>
or Option<TransformedRecordType>
to represent the presence of lack thereof of a valid record without doing low level null
handling and still returning one type.Craig
02/24/2021, 3:31 AMmichoel
02/24/2021, 3:37 AMstalbert
02/24/2021, 3:40 AMstalbert
02/24/2021, 3:41 AM_.attempt()
which automatically catches exceptions and turns it into a return value (though that does effectively make the thing return two types, either the exception (Error) or the transformed record object.michoel
02/24/2021, 3:42 AMfunction doSomething() {
try {
// do something
} catch(error) {
emailErrorReport(error);
}
}
Craig
02/24/2021, 3:43 AMstalbert
02/24/2021, 3:43 AMstalbert
02/24/2021, 3:43 AMtry {
// do something
} catch () {
}
stalbert
02/24/2021, 3:44 AMCraig
02/24/2021, 3:44 AMmichoel
02/24/2021, 3:45 AMstalbert
02/24/2021, 3:45 AMstalbert
02/24/2021, 3:46 AM{}