Code to test the effect of exceptions happening in strategic places in daemons.
In order to use this module one defines a list of (mnemonic, exception) pairs
E.G.
("M.f: invalid arg", Invalid_argument "foo");
("Z.f: sys error", Sys_error "bar");
("R.z: failure", Failure "baz")
And one passes this list to create. Then one places calls to
Exception_check.maybe_raise <name>, in important parts of one's
code. When the code is run, it will listen on listen_port
, and
one can connect with netcat and type a name, which will
cause that exception to be raised on the next call to
Exception_check.maybe_raise
.