Removes handling of explicit errno values and uses exceptions instead.