Template:cpp/filesystem/error handling exception only

May throw on underlying OS API errors or  if memory allocation fails.