     location = [line: line, file: Path.relative_to(file, System.cwd!)]
     stack    = Macro.escape [{ module, :__MODULE__, 0, location }]
 
-    exc_filter_fn = (function do
+    exc_filter_fn = fn
       { _, {:error, _, _} } -> true
       _ -> false
-    end)
+    end
 
     exceptions_num = Enum.count exprs, exc_filter_fn
     if exceptions_num > 1 do
-      # Format the info about error location as if it were a part of the
-      # stacktrace
+      # Format the info about error location as if it were a part of the stacktrace
       { fun, arity } = fun_arity
       error_info = "    #{file}:#{line}: #{inspect module}.#{fun}/#{arity}"
-      raise Error, [message: "Multiple exceptions in one doctest case are not supported.\n#{error_info}"]
+      raise Error, message: "multiple exceptions in one doctest case are not supported.\n#{error_info}"
     end
 
     { tests, whole_expr } = Enum.map_reduce exprs, "", fn {expr, expected}, acc ->

                description: expr,
                expected: exception,
                reason: "raise",
                actual: inspect(error) ],
              stack
          end



    exception = case Enum.find(exprs, exc_filter_fn) do
      { _, {:error, exception, message} } ->
        inspect(exception) <> " with message " <> message
      nil ->
        "nothing"
    end
