aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/compile_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-09-05 13:57:09 +0200
committerBjörn Gustavsson <[email protected]>2013-09-05 14:28:08 +0200
commit60984adef62f5e5bf8c65f403d4f8522afb6d40a (patch)
treeb44fe1497cce75afc9b675b32f1478bedc233906 /lib/compiler/test/compile_SUITE.erl
parent11c31f5ba8489b0e179caea46e514b990fbadb95 (diff)
downloadotp-60984adef62f5e5bf8c65f403d4f8522afb6d40a.tar.gz
otp-60984adef62f5e5bf8c65f403d4f8522afb6d40a.tar.bz2
otp-60984adef62f5e5bf8c65f403d4f8522afb6d40a.zip
compiler: Conform returned errors to the documented format
ErrorInfo is documented to be: {ErrorLine,Module,ErrorDescriptor} but for some errors with line numbers it would look like: {Module,ErrorDescriptor} Ensure that all ErrorInfo tuples have three elements. Use 'none' instead of a line number: {none,Module,ErrorDescriptor} There already are errors that return 'none' when no line number is available, but that convention was not documented. Mention it in the documentation. Also make sure that the compiler will not print 'none' as a line number in error messages (if the 'report_errors' option is given) as that looks stupid. That is, when attempting to compile a non-existing module, the error message should be: non-existing.erl: no such file or directory and not: non-existing.erl:none: no such file or directory
Diffstat (limited to 'lib/compiler/test/compile_SUITE.erl')
-rw-r--r--lib/compiler/test/compile_SUITE.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index 97777568b6..be01ea713d 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -139,8 +139,8 @@ forms_2(Config) when is_list(Config) ->
module_mismatch(Config) when is_list(Config) ->
?line DataDir = ?config(data_dir, Config),
?line File = filename:join(DataDir, "wrong_module_name.erl"),
- ?line {error,[{"wrong_module_name.beam",
- [{compile,{module_name,arne,"wrong_module_name"}}]}],
+ {error,[{"wrong_module_name.beam",
+ [{none,compile,{module_name,arne,"wrong_module_name"}}]}],
[]} = compile:file(File, [return]),
?line error = compile:file(File, [report]),