rescue exception and return it as a string.