cast typeinfo to string at exception handling