Additionally, create princToString() for use in error messages, making the required replacement where appropriate.