All I can think of is:
Code:
./program 2>/tmp/error_file; if [ -s /tmp/error_file ] ; then cat /tmp/error_file | sendmail youremail@yourserver.com ; rm /tmp/error_file ; fi
You'd have to maybe set up aliases or wrapper scripts for this. It doesn't seem a very sensible thing to do either, you're going to have your mailbox flooded with emails that mean little if nothing.
And of course, this only works for software. You can get smartd to send you emails if it detects problems on your hard drives, but I know of nothing that will work for kernel errors or other hardware errors..