diff options
author | José Valim <[email protected]> | 2019-01-16 15:25:21 +0100 |
---|---|---|
committer | José Valim <[email protected]> | 2019-03-01 06:37:50 -0800 |
commit | d92eb79322fa4ee45ce1c0c7c4ed8a573673474b (patch) | |
tree | c8d6fc3b1ffde1ee4c081e63c1bb416a7e16452a /erts/emulator/beam/beam_emu.c | |
parent | 06f43998fd9dcc5afec0cfb13bb60549fe20d663 (diff) | |
download | otp-d92eb79322fa4ee45ce1c0c7c4ed8a573673474b.tar.gz otp-d92eb79322fa4ee45ce1c0c7c4ed8a573673474b.tar.bz2 otp-d92eb79322fa4ee45ce1c0c7c4ed8a573673474b.zip |
Add application:set_env/1 and application:set_env/2
It is equivalent to calling application:set_env/4 on
each application individually, except it is more efficient.
When given duplicate apps or duplicate keys, set_env/1
and set_env/2 will warn. The warning will also be emitted
during boot:
$ erl -config dupkeys.config -s erlang halt
2019-02-27 11:16:02.653100 application: kernel; duplicate parameter: key1
=WARNING REPORT==== 27-Feb-2019::11:16:02.653100 ===
application: kernel; duplicate parameter: key1
$ erl -config dupapps.config -s erlang halt
2019-02-27 11:16:02.653100 duplicate application config: kernel
=WARNING REPORT==== 27-Feb-2019::11:16:02.653100 ===
duplicate application config: kernel
Prior to this patch, the behaviour was unspecified,
and duplicate keys and duplicate apps would behave
different depending on the amount of config, the name
of the config files, and how those configs would be
listed. The goal is to raise an error in the future.
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
0 files changed, 0 insertions, 0 deletions