improved exception handling, added new macro UTIL_THROW_EXCEPTION