Improve behaviour of warning macro, add names to default error handlers