Implement default/type/error handler.

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>