diff options
author | HÃ¥kan Mattsson <[email protected]> | 2010-03-19 13:38:07 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-03-19 14:47:49 +0100 |
commit | 8b4222e57d90e712240974d2b0cf7a71b4ad69ce (patch) | |
tree | 1fc0d27f4500822cc289bbe3522b69962a4515e6 /lib/megaco | |
parent | f4b825b43fd8057f89d8ed4c6d8a1e1d775d42b3 (diff) | |
download | otp-8b4222e57d90e712240974d2b0cf7a71b4ad69ce.tar.gz otp-8b4222e57d90e712240974d2b0cf7a71b4ad69ce.tar.bz2 otp-8b4222e57d90e712240974d2b0cf7a71b4ad69ce.zip |
Enhance error message for faulty app file
Diffstat (limited to 'lib/megaco')
-rw-r--r-- | lib/megaco/test/megaco_app_test.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/megaco/test/megaco_app_test.erl b/lib/megaco/test/megaco_app_test.erl index 8e2148c236..597ec26338 100644 --- a/lib/megaco/test/megaco_app_test.erl +++ b/lib/megaco/test/megaco_app_test.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2002-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 2002-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% @@ -87,6 +87,10 @@ is_app(App) -> case file:consult(File) of {ok, [{application, App, AppFile}]} -> {ok, AppFile}; + {error, {LineNo, Mod, Code}} -> + IoList = lists:concat([File, ":", LineNo, ": ", + Mod:format_error(Code)]), + {error, list_to_atom(lists:flatten(IoList))}; Error -> {error, {invalid_format, Error}} end. |