error handling

Functional error handling in Scala

Because functional programming is like algebra, there are no null values or exceptions. But of course you can still have exceptions when you try to access servers that are down or files that are missing, so what can you do? This lesson demonstrates the techniques of functional error handling in Scala.

Perl exception handling

I've been working on a Perl module that makes sending email messages a breeze, but one problem I had is that the Perl module MIME::Lite has a nasty way of failing when something goes wrong. I could not "catch" it's errors with die or warn, so after a little research, I found out how to deal with this problem using eval. According to one text, using eval is the only mechanism Perl has for exception handling.

Here's what I was doing that didn't work: