Didn’t know about this! Here are the official docs for Erlang: https://erlang.org/doc/man/error_handler.html#undefined_function-3 (comes with a big warning discouraging its use, of course).
Conversely, there’s also erlang:function_exported/3 to check if a given module implements a given function.
erlang:function_exported/3
Well, you can do it like that, but it is highly discouraged as it is easy to make it borked.
Didn’t know about this! Here are the official docs for Erlang: https://erlang.org/doc/man/error_handler.html#undefined_function-3 (comes with a big warning discouraging its use, of course).
Conversely, there’s also
erlang:function_exported/3
to check if a given module implements a given function.Well, you can do it like that, but it is highly discouraged as it is easy to make it borked.