     rescue
       exception in Inspect.Error ->
         assert Exception.message(exception) =~ exception_message
-        assert [{:erlang, :atom_to_binary, _, _} | _] = __STACKTRACE__
+        assert [{MyArgumentError, fun_name, 0, [{:file, _}, {:line, _} | _]} | _] = __STACKTRACE__
+
+        assert fun_name in [:"-culprit/0-fun-0-", :culprit]
+        assert Exception.message(exception) =~ exception_message
     else
       _ -> flunk("expected failure")
     end


  test "unsafely inspect bad implementation" do
    exception_message = ~s'''
    got ArgumentError with message:

        """
        errors were found at the given arguments:

    else
      _ -> flunk("expected failure")
    end
  end

  test "Exception.message/1 with bad implementation" do
    message = ~s'''
    #Inspect.Error<
      got MyArgumentError with message:

          """
          errors were found at the given arguments:

            * 1st argument: not an atom
          """

      while inspecting:

          %{__struct__: Inspect.MapTest.Failing, name: "Foo"}
    '''

    {my_argument_error, stacktrace} =
      try do
        MyArgumentError.culprit()
      rescue
        e ->
          {e, __STACKTRACE__}
      end

    inspected =
      inspect(
        Inspect.Error.exception(
          exception: my_argument_error,
          stacktrace: stacktrace,
          inspected_struct: "%{__struct__: Inspect.MapTest.Failing, name: \"Foo\"}"
        )
      )

    assert inspect(%Failing{name: "Foo"}) =~ message
    assert inspected =~ message
  end

  test "exception" do
