Skip to content

Commit fb3e156

Browse files
committed
Raise if Elixir is compiled without source information, closes #1306
1 parent 47649aa commit fb3e156

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/plug/debugger_test.exs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,13 @@ defmodule Plug.DebuggerTest do
353353
assert conn.resp_body =~ "hello://open?file=#{file}&line=1"
354354

355355
conn = stack([{GenServer, :call, 2, file: "lib/gen_server.ex", line: 10_000}])
356-
file = Path.expand(GenServer.__info__(:compile)[:source])
356+
357+
file =
358+
Path.expand(
359+
GenServer.__info__(:compile)[:source] ||
360+
raise("Elixir compiled without source information")
361+
)
362+
357363
assert conn.resp_body =~ "hello://open?file=#{file}&line=10000"
358364
end
359365

0 commit comments

Comments
 (0)