[PATCH] Improve error message for {error, no_src} in int:int_mod/2

Leo Liu <[email protected]> Thu, 20 Aug 2015 18:23:51 +0800
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
The catch all error message doesn't explain {error, no_src} and is
confusing.

_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
0001-Improve-error-message-for-error-no_src-in-int-int_mo.patch (text/x-patch, 837 B)
From c3a97c68627fa73755efd149c43ef46ca2760861 Mon Sep 17 00:00:00 2001
From: Leo Liu <[email protected]>
Date: Thu, 20 Aug 2015 17:27:02 +0800
Subject: [PATCH] Improve error message for {error, no_src} in int:int_mod/2

---
 lib/debugger/src/int.erl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/debugger/src/int.erl b/lib/debugger/src/int.erl
index 4f54beb4..3f1ff193 100644
--- a/lib/debugger/src/int.erl
+++ b/lib/debugger/src/int.erl
@@ -514,6 +514,9 @@ int_mod(AbsMod, Dist) when is_atom(AbsMod); is_list(AbsMod) ->
 	    io:format("** Cannot interpret ~p module: ~p~n",
 		      [App, AbsMod]),
 	    error;
+	{error, no_src} ->
+	    io:format("** Cannot find module source: ~tp\n", [AbsMod]),
+	    error;
 	_Error ->
 	    io:format("** Invalid beam file or no abstract code: ~tp\n",
 		      [AbsMod]),
-- 
2.5.0