Safe repr for exception reporting