anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   init([]) ->
  +    erlang:process_flag(trap_exit, true),
       {ok, #state{last_tstamp = misc:time_to_epoch_ms_int(now()) - ?MIN_LOG_INTERVAL}}.
   
   %%--------------------------------------------------------------------
  
positive.code: %%                                  {stop, Reason, State}
  %% @end
  %%--------------------------------------------------------------------
  handle_cast({diag, Err}, State) ->
      {noreply, do_diag(Err, State)};
  handle_cast(_Msg, State) ->
      {noreply, State}.
  
  
negative.code: %%%===================================================================
  %%% Internal functions
  %%%===================================================================
  