That's very platform dependent. Different exceptions will be thrown on different platforms for different reason. Should I list all these:

http://man7.org/linux/man-pages/man3/realpath.3.html#ERRORS

And all the errors for all the other functions?