Provide an exception message for BadRef#272
Provide an exception message for BadRef#272lewisjkl merged 2 commits intodisneystreaming:mainfrom Jacoby6000:fix-badref-error-messages
Conversation
|
Hey @Jacoby6000 thanks for contributing! I like the change, do you think you could also add a test case that shows what this fixes so we can avoid future regressions? |
|
I went ahead and added the test suite. In hindsight I'm not so sure this is actually testing anything, given that the compiler now enforces that messages must not be null |
Right, I was more-so thinking of a test where the input was a reduced version of whatever you ran that caused the error to pop up originally. That way we have a test that, without your fix, would fail. |
Ah, that is addressed in #273 This PR doesn't really fix anything. It just improves the developer experience when they come across a BadRef |
I ran in to this while translating some non-trivial json schema specs. Without this change, bad refs evaluate to
nullwhengetMessageis called.Also updated the trait definition such that all traits must provide an error message or else compilation will fail.