You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code here is suboptimal for a number of reasons:
If an exception occurs during the loading of any schema, the cause of the exception is lost--instead the cause should be included as the second argument of IonSchemaExceptionso that the stack trace is plainly visible to those who need to troubeshoot. As it is now, the troubleshooter has to go thru a lot of extra hoops to diagnose failed schema loading.
This pattern seems to suggest it's ok to throw exceptions when a schema can't be loaded, i.e. during normal operation. I.e. that an Authority should just throw an exception and the Ion schema system will continue searching the other loaded authorities for the schema, however:
Throwing exceptions can degrade performance.
It is generally never a good idea to throw exceptions during normal program execution--they should only be used for unrecoverable and unexpected errors.
This code really should be refactored to ameliorate these issues.
The text was updated successfully, but these errors were encountered:
This code here is suboptimal for a number of reasons:
IonSchemaException
so that the stack trace is plainly visible to those who need to troubeshoot. As it is now, the troubleshooter has to go thru a lot of extra hoops to diagnose failed schema loading.Authority
should just throw an exception and the Ion schema system will continue searching the other loaded authorities for the schema, however:This code really should be refactored to ameliorate these issues.
The text was updated successfully, but these errors were encountered: