If you
use Errno;, then you can use symbolic constants such as ENOENT for 2. This is a little more portable than using the actual numbers, but the constants are not guaranteed to be defined except on POSIX systems. You can see the current list of POSIX error constants at
http://www.opengroup.org/onlinepubs/007904975/basedefs/errno.h.html.