     \[error\] Task #PID<\d+\.\d+\.\d+> started from #PID<\d+\.\d+\.\d+> terminating
     Function: &Logger.TranslatorTest.undef/0
         Args: \[\]
-    \*\* \(exit\) an exception was raised:
-        \*\* \(UndefinedFunctionError\) undefined function: Logger.TranslatorTest.undef/0
+    \*\* \(UndefinedFunctionError\) undefined function: Logger.TranslatorTest.undef/0
+    """
+  end
+
+  test "translates Task raising ErlangError" do
+    assert capture_log(fn ->
+      exception = try do
+          :erlang.error(:foo)
+        rescue
+         x ->
+           x
+        end
+      {:ok, pid} = Task.start(:erlang, :error, [exception])
+      ref = Process.monitor(pid)
+      receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
+    end) =~ ~r"""
+    \[error\] Task #PID<\d+\.\d+\.\d+> started from #PID<\d+\.\d+\.\d+> terminating
+    Function: &:erlang\.error/1
+        Args: \[%ErlangError{.*}\]
+    \*\* \(ErlangError\) erlang error: :foo
+    """
+  end
+
+  test "translates Task raising erlang badarg error" do
+    assert capture_log(fn ->
+      {:ok, pid} = Task.start(:erlang, :error, [:badarg])
+      ref = Process.monitor(pid)
+      receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
+    end) =~ ~r"""
+    \[error\] Task #PID<\d+\.\d+\.\d+> started from #PID<\d+\.\d+\.\d+> terminating
+    Function: &:erlang\.error/1
+        Args: \[:badarg\]
+    \*\* \(ArgumentError\) argument error
+    """
+  end
+
+  test "translates Task exiting abnormally" do
+    assert capture_log(fn ->
+      {:ok, pid} = Task.start(:erlang, :exit, [:abnormal])
+      ref = Process.monitor(pid)
+      receive do: ({:DOWN, ^ref, _, _, _} -> :ok)
+    end) =~ ~r"""
+    \[error\] Task #PID<\d+\.\d+\.\d+> started from #PID<\d+\.\d+\.\d+> terminating
+    Function: &:erlang\.exit/1
+        Args: \[:abnormal\]
+    \*\* \(stop\) :abnormal
     """
   end
 

    [error] GenServer #{inspect pid} terminating
    Last message: :error
    State: :ok
    ** (exit) an exception was raised:
        ** (RuntimeError) oops
    """
  end


      GenEvent.call(pid, MyGenEvent, :error)
    end) =~ """
    [error] GenEvent handler Logger.TranslatorTest.MyGenEvent installed in #{inspect pid} terminating
    ** (RuntimeError) oops
    """
  end

