aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/crash_h.erl
blob: b687ababf76e1a6b9feef748332ab1de3525edf2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%% This module crashes immediately.

-module(crash_h).

-behaviour(cowboy_handler).

-export([init/2]).

-spec init(_, _) -> no_return().
init(_, no_reply) ->
	ct_helper:ignore(?MODULE, init, 2),
	error(crash);
init(Req, reply) ->
	_ = cowboy_req:reply(200, Req),
	ct_helper:ignore(?MODULE, init, 2),
	error(crash).