Erlang 오류 정보 확장

8414 단어 Erlangtech

총결산


일목요연하다.

지금까지


Erlang/OTP 23 [erts-11.1.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

Eshell V11.1.3  (abort with ^G)
1> erlang:element(a, b).
** exception error: bad argument
     in function  element/2
        called as element(a,b)

금후


Erlang/OTP 24 [DEVELOPMENT] [erts-11.1.3] [source-54ce4aefca] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]

Eshell V11.1.3  (abort with ^G)
1> erlang:element(a, b).
** exception error: bad argument
     in function  element/2
        called as element(a,b)
        *** argument 1: not an integer
        *** argument 2: not a tuple

개요


EEP 54: Provide more information about errors
지금까지 Erlang/OPP BIF가 높아진 예외는 매우 유감스럽지만, 그것은 이해하기 쉽다.

PR


Add extended error information for all BIFs in the ERTS application by bjorng · Pull Request #2925 · erlang/otp

컨텐트


> list_to_binary(a).
** exception error: bad argument
     in function  list_to_binary/1
        called as list_to_binary(a)
        *** argument 1: not an iolist term

> integer_to_binary(a).
** exception error: bad argument
     in function  integer_to_binary/1
        called as integer_to_binary(a)
        *** argument 1: not an integer

잡감


최고예요.

좋은 웹페이지 즐겨찾기