Enhanced exception handling. --Issue with uninitialized constant.