   @doc """
   Writable temporary directory, exception on error.
 
-  Same as `tmp_dir/0` but raises `System.NoTmpDirError`
+  Same as `tmp_dir/0` but raises `RuntimeError`
   instead of returning `nil` if no temp dir is set.
   """
   def tmp_dir! do
-    tmp_dir || raise NoTmpDirError
+    tmp_dir ||
+      raise RuntimeError, message: "could not get a writable temporary directory, " <>
+                                   "please set the TMPDIR environment variable"
   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 ArgumentError, message: "could not read the version number from VERSION"
      data -> data
    end
  end

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