use str to serialize exceptions