Error display: Updated to be easily adaptable to different objects.