Skip to content

Instantly share code, notes, and snippets.

@marcelog
Created May 10, 2016 19:13
Show Gist options
  • Select an option

  • Save marcelog/7ee235979a7f0adc8890f712866a6f56 to your computer and use it in GitHub Desktop.

Select an option

Save marcelog/7ee235979a7f0adc8890f712866a6f56 to your computer and use it in GitHub Desktop.

Revisions

  1. marcelog created this gist May 10, 2016.
    10 changes: 10 additions & 0 deletions mymodule.erl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    -module(mymodule).
    start_link() ->
    gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
    ...
    crash() ->
    gen_server:cast(?MODULE, crash).
    ...
    handle_cast(crash,State) ->
    {stop, error, State};
    ...