Convert cannot compile file into cannot compile cell

This commit is contained in:
José Valim 2022-11-28 15:01:31 +01:00
parent 93532b8d63
commit dd68f7ff1c

View file

@ -87,7 +87,14 @@ defmodule Livebook.Runtime.Evaluator.DefaultFormatter do
end
defp format_error(kind, error, stacktrace) do
{blamed, stacktrace} = Exception.blame(kind, error, stacktrace)
{blamed, stacktrace} =
case error do
%CompileError{description: "cannot compile file (errors have been logged)" <> _, line: 0} ->
{%CompileError{description: "cannot compile cell (errors have been logged)"}, []}
_ ->
Exception.blame(kind, error, stacktrace)
end
banner =
case blamed do