error handling functions now take exception class argument
fixes