Skip to content

Commit

Permalink
fix documentation about undefined_field
Browse files Browse the repository at this point in the history
Summary: - as title, the previous paragraph was wrong

Reviewed By: VLanvin

Differential Revision: D66246696

fbshipit-source-id: 440f08d37633d054f0fe158e877714407150c0ca
  • Loading branch information
ilya-klyuchnikov authored and facebook-github-bot committed Nov 21, 2024
1 parent 759af3c commit be7e0aa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion docs/reference/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,18 @@ test_neg() ->

### undefined_field

This error occurs when attempting to create a record with a field that does not exist.
This error occurs when attempting to create a record without specifying the value for a field
when the field type doesn't allow `undefined` values.

Example:
```Erlang
-record(user, {name :: string(), id :: binary()}).

-spec create_user() -> #user{}.
create_user() -> #user{id = <<"000">>}.

% #user{...}: name is undefined
```


### unbound_var
Expand Down

0 comments on commit be7e0aa

Please sign in to comment.