1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2004-2016. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%%
20-module(otp_5151).
21
22-export([?MODULE/0]).
23-export([read_variables/1,read_variables_1/1,read_variables_2/1,
24	 read_variables_3/1,read_variables_4/1]).
25
26?MODULE() ->
27    ok.
28
29read_variables(Name) ->
30    case file:consult(Name) of
31	{ok,Vars} -> Vars;
32	{error,Reason} ->
33	    erlang:error({bad_installation,file:format_error(Reason)}, [Name])
34    end.
35
36read_variables_1(Name) ->
37    case file:consult(Name) of
38	{ok,Vars} -> Vars;
39	{error,Reason} ->
40	    erlang:error({bad_installation,file:format_error(Reason)})
41    end.
42
43read_variables_2(Name) ->
44    case file:consult(Name) of
45	{ok,Vars} -> Vars;
46	{error,Reason} ->
47	    erlang:error({bad_installation,file:format_error(Reason)}, [Name])
48    end.
49
50read_variables_3(Name) ->
51    case file:consult(Name) of
52	{ok,Vars} -> Vars;
53	{error,Reason} ->
54	    erlang:error({bad_installation,file:format_error(Reason)})
55    end.
56
57read_variables_4(Name) ->
58    case file:consult(Name) of
59	{ok,Vars} -> Vars;
60	{error,Reason} ->
61	    exit({bad_installation,file:format_error(Reason)})
62    end.
63