usage: add get_error_routine() and get_warn_routine()