summaryrefslogtreecommitdiff
path: root/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt')
-rw-r--r--lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt b/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt
index 0af05f72c5..73f183013f 100644
--- a/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt
+++ b/lib/stdlib/test/shell_docs_SUITE_data/unknown_erlang_error_3_func.txt
@@ -2,7 +2,7 @@
-spec error(Reason, Args, Options) -> no_return()
 when
 Reason :: term(),
-  Args :: [term()],
+  Args :: [term()] | none,
 Options :: [Option],
 Option :: {error_info, ErrorInfoMap},
 ErrorInfoMap ::
@@ -11,18 +11,27 @@
 function => atom()}.
Since:
- 24.0
+ OTP 24.0
- Raises an exception of class error with the reason Reason,
- where Reason is any term. Args is expected to be the list of
- arguments for the current function; it is used to provide the
- arguments for the current function in the stack back-trace. If the 
- {error_info, ErrorInfoMap} option is given, it will be injected
- into the stacktrace.
+ Raises an exception of class error with the reason Reason. 
+ Args is expected to be the list of arguments for the current
+ function or the atom none. If it is a list, it is used to
+ provide the arguments for the current function in the stack
+ back-trace. If it is none, the arity of the calling function is
+ used in the stacktrace. As evaluating this function causes an
+ exception to be raised, it has no return value.
- As evaluating this function causes an exception to be raised, it
- has no return value. The intent of the exception class error is
- to signal that an unexpected error has happened (for example, a
- function is called with a parameter that has an incorrect type).
- See the guide about errors and error handling for additional
- information.
+ If the error_info option is given, the ErrorInfoMap will be
+ inserted into the stacktrace. The information given in the 
+ ErrorInfoMap is to be used by error formatters such as erl_error
+ to provide more context around an error.
+
+ The default module of the ErrorInfoMap is the module that the
+ call to error/3 is made. The default function is format_error.
+ See format_error/2 for more details on how this
+ Module:Function/2 is to be used
+
+ The intent of the exception class error is to signal that an
+ unexpected error has happened (for example, a function is called
+ with a parameter that has an incorrect type). See the guide about
+ errors and error handling for additional information.