fix __toString with exceptions