
  [;1m-spec error(Reason) -> no_return() when Reason :: term().[0m

  Raises an exception of class [;;4merror[0m with the reason [;;4mReason[0m. As
  evaluating this function causes an exception to be thrown, it has
  no return value.

  The intent of the exception class [;;4merror[0m 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. Example:

    > catch error(foobar).
    {'EXIT',{foobar,[{shell,apply_fun,3,
                            [{file,"shell.erl"},{line,906}]},
                     {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,677}]},
                     {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,430}]},
                     {shell,exprs,7,[{file,"shell.erl"},{line,687}]},
                     {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
                     {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}}

  [;1m-spec error(Reason, Args) -> no_return()[0m
  [;1m               when Reason :: term(), Args :: [term()] | none.[0m

  Raises an exception of class [;;4merror[0m with the reason [;;4mReason[0m. [;;4m[0m
  [;;4mArgs[0m is expected to be the list of arguments for the current
  function or the atom [;;4mnone[0m. If it is a list, it is used to
  provide the arguments for the current function in the stack
  back-trace. If it is [;;4mnone[0m, 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.

  The intent of the exception class [;;4merror[0m 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. Example:

  [;;4mtest.erl[0m:

    -module(test).
    -export([example_fun/2]).
    
    example_fun(A1, A2) ->
        erlang:error(my_error, [A1, A2]).

  Erlang shell:

    6> c(test).
    {ok,test}
    7> test:example_fun(arg1,"this is the second argument").
    ** exception error: my_error
         in function  test:example_fun/2
             called as test:example_fun(arg1,"this is the second argument")

  [;1m-spec error(Reason, Args, Options) -> no_return()[0m
  [;1m               when[0m
  [;1m                   Reason :: term(),[0m
  [;1m                   Args :: [term()] | none,[0m
  [;1m                   Options :: [Option],[0m
  [;1m                   Option :: {error_info, ErrorInfoMap},[0m
  [;1m                   ErrorInfoMap ::[0m
  [;1m                       #{cause => term(),[0m
  [;1m                         module => module(),[0m
  [;1m                         function => atom()}.[0m

[;;4mSince[0m:
  OTP 24.0

  Raises an exception of class [;;4merror[0m with the reason [;;4mReason[0m. [;;4m[0m
  [;;4mArgs[0m is expected to be the list of arguments for the current
  function or the atom [;;4mnone[0m. If it is a list, it is used to
  provide the arguments for the current function in the stack
  back-trace. If it is [;;4mnone[0m, 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.

  If the [;;4merror_info[0m option is given, the [;;4mErrorInfoMap[0m will be
  inserted into the stacktrace. The information given in the [;;4m[0m
  [;;4mErrorInfoMap[0m is to be used by error formatters such as [;;4merl_error[0m
  to provide more context around an error.

  The default [;;4mmodule[0m of the [;;4mErrorInfoMap[0m is the module that the
  call to [;;4merror/3[0m is made. The default [;;4mfunction[0m is [;;4mformat_error[0m.
  See [;;4mformat_error/2[0m for more details on how this
  Module:Function/2 is to be used

  The intent of the exception class [;;4merror[0m 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.
