chore: Extracting formatting of failure messages

Preparing for ability to register different ways of formatting failures.
This enables us to add stuff like visual studio friendly error messages.