aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/src/compiler/diameter_codegen.erl9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/diameter/src/compiler/diameter_codegen.erl b/lib/diameter/src/compiler/diameter_codegen.erl
index 325a37e20d..f2c10f1748 100644
--- a/lib/diameter/src/compiler/diameter_codegen.erl
+++ b/lib/diameter/src/compiler/diameter_codegen.erl
@@ -58,7 +58,11 @@
from_dict(File, ParseD, Opts, Mode) ->
Outdir = proplists:get_value(outdir, Opts, "."),
putr(verbose, lists:member(verbose, Opts)),
- codegen(File, ParseD, Outdir, Mode).
+ try
+ codegen(File, ParseD, Outdir, Mode)
+ after
+ eraser(verbose)
+ end.
%% Optional reports when running verbosely.
report(What, Data) ->
@@ -76,6 +80,9 @@ putr(Key, Value) ->
getr(Key) ->
get({?MODULE, Key}).
+eraser(Key) ->
+ erase({?MODULE, Key}).
+
%% ===========================================================================
%% ===========================================================================