 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 """
  Writable temporary directory, exception on error.

  Same as `tmp_dir/0` but raises `System.NoTmpDirError`
  instead of returning `nil` if no temp dir is set.
  """
  def tmp_dir! do
    tmp_dir || raise NoTmpDirError
  end

  defp write_env_tmp_dir(env) do

  # Read and strip the version from the `VERSION` file.
  defmacrop get_version do
    case read_stripped(:filename.join(__DIR__, "../../../VERSION")) do
      ""   -> raise RuntimeError, message: "could not read the version number from VERSION"
      data -> data
    end
  end
