From 3f79e7bd7e743ffd40b624caf680aef2bdb15dc7 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Thu, 16 Jan 2014 12:57:43 +0100 Subject: Don't format diameter_make:codec/2 errors Instead, add diameter_make:format_error/1 to allow the caller to format if desired, which is what applications like compiler and yecc do. Use this to check that the expected error is the one actually generated in the compiler suite. --- lib/diameter/doc/src/diameter_make.xml | 18 +++++++++++++++++- lib/diameter/doc/src/seealso.ent | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'lib/diameter/doc/src') diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml index 1c1eff6c6a..16ef49d4b2 100644 --- a/lib/diameter/doc/src/diameter_make.xml +++ b/lib/diameter/doc/src/diameter_make.xml @@ -16,7 +16,7 @@
2012 -2013 +2014 Ericsson AB. All Rights Reserved. @@ -175,6 +175,10 @@ Note that a dictionary's &dict_name;, together with the The &dict_name; of a literal input dictionary defaults to dictionary.

+

+A returned error reason can be converted into a readable string using +&format_error;.

+ @@ -206,6 +210,18 @@ The return value is also a parsed dictionary.

+ + + +format_error(Reason) -> string() +Turn an error reason into a readable string. + + +

+Turn an error reason returned by &codec; into a readable string.

+
+
+ diff --git a/lib/diameter/doc/src/seealso.ent b/lib/diameter/doc/src/seealso.ent index 7bf7460351..44541afb9b 100644 --- a/lib/diameter/doc/src/seealso.ent +++ b/lib/diameter/doc/src/seealso.ent @@ -4,7 +4,7 @@ %CopyrightBegin% -Copyright Ericsson AB 2012-2013. All Rights Reserved. +Copyright Ericsson AB 2012-2014. 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 @@ -117,6 +117,7 @@ significant. diameter_make:codec/2'> diameter_make:format/1'> diameter_make:flatten/1'> +diameter_make:format_error/1'> -- cgit v1.2.3