   @doc """
   Current working directory, exception on error.
 
-  Returns the current working directory or raises `System.NoAccessCwdError`.
+  Returns the current working directory or raises `RuntimeError`.
   """
   def cwd! do
-    cwd || raise NoAccessCwdError
+    cwd ||
+      raise RuntimeError, message: "could not get a current working directory, the current location is not accessible"
   end
 
   @doc """

defmodule System do
  defexception NoHomeError,
    message: "could not find the user home, please set the HOME environment variable"

  defexception NoTmpDirError,
    message: "could not get a writable temporary directory, please set the TMPDIR environment variable"

  defexception NoAccessCwdError,
    message: "could not get a current working directory, the current location is not accessible"

  @moduledoc """
  The System module provides access to variables used or
  maintained by the VM and to functions that interact directly

  @doc """
  User home directory, exception on error.

  Same as `user_home/0` but raises `RuntimeError`
  instead of returning `nil` if no user home is set.
  """
  def user_home! do
    user_home ||
      raise RuntimeError, message: "could not find the user home, please set the HOME environment variable"
  end

  defp get_unix_home do
