-
-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Description
I accidentally tried calling meck:new/2 with both options and I got the following error:
=CRASH REPORT==== 24-Oct-2025::09:45:32.846808 ===
crasher:
initial call: meck_proc:init/1
pid: <0.1266.0>
registered_name: []
exception error: no match of right hand side value {error,nofile}
in function meck_proc:init/1 (/home/mmin/x/_build/test/lib/meck/src/meck_proc.erl:216)
in call from gen_server:init_it/2 (gen_server.erl:2276)
in call from gen_server:init_it/6 (gen_server.erl:2236)
ancestors: [<0.1264.0>,<0.1226.0>,<0.1225.0>,user_drv,<0.70.0>,<0.66.0>,
kernel_sup,<0.47.0>]
It wasn't very intuitive on what's going on.
Can be return a better error here? Probably somewhere after meck_proc:validate_options/1 call there could be check whether those 2 options were used together.
Potentially this should be documented somewhere also.
Open to make a PR
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels