Testing framework: perf. fix; compute error_type only when needed
type:fixed
For LIGO developers
A previous change makes type errors more informative; but we're calling Format.asprintf
too much (which is too slow).
This MR prevents the call until needed.
Changelog details: