[erlang-questions] Differences in code_change callback between gen_server and gen_fsm

Florian Waas flw@REDACTED
Tue Jan 6 19:41:58 CET 2015


In gen_server the callback for code_change is spec’d as 

  Module:code_change(OldVsn, State, Extra) -> {ok, NewState} | {error, 
Reason}

in gen_fsm as

  Module:code_change(OldVsn, StateName, StateData, Extra) -> {ok, 
NextStateName, NewStateData}

i.e., upgrades on FSM’s had better succeed? The underlying implementation 
in sys.erl is the same for both and allows for an error case.
Am I missing some subtlety here?

Thanks,
-fl.



More information about the erlang-questions mailing list