user functions now use exceptions