crash_h.erl 316 B

12345678910111213141516
  1. %% This module crashes immediately.
  2. -module(crash_h).
  3. -behaviour(cowboy_handler).
  4. -export([init/2]).
  5. -spec init(_, _) -> no_return().
  6. init(_, no_reply) ->
  7. ct_helper:ignore(?MODULE, init, 2),
  8. error(crash);
  9. init(Req, reply) ->
  10. _ = cowboy_req:reply(200, Req),
  11. ct_helper:ignore(?MODULE, init, 2),
  12. error(crash).