It seems that I run into quite a few errors while debugging that
actually occur because Ruby is trying to show me a SchemaError but can't
because its #to_s can't run because no pointer is present.
This patch still shows the same information in #to_s, but makes the
method a little more robust in that it can still run even if a schema
wasn't present. This probably still represents a problem case, but if we
want to throw an error, doing so from inside an error class isn't the
place to do it.
It seems that I run into quite a few errors while debugging that actually occur because Ruby is trying to show me a SchemaError but can't because its #to_s can't run because no pointer is present.
This patch still shows the same information in #to_s, but makes the method a little more robust in that it can still run even if a schema wasn't present. This probably still represents a problem case, but if we want to throw an error, doing so from inside an error class isn't the place to do it.