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
At present, at least for me, failed assertions cause the app to stop and go into the debugger. If the failures are already validation messages, then maybe convert them to ordinary log messages? Here are the two example I ran into today:
Assertion failed: lineNumber is repeated in location in {"priority":276,"message":"Missing OrigQuote field","bookID":"JUD","C":"1","V":"1","lineNumber":3,"location":" with ID 'ek3q' en JUD book package from unfoldingWord","extra":"TN"}
processNoticesCommon @ notice-processing-functions.js:131
processNoticesToSevereMediumLow @ notice-processing-functions.js:396
Assertion failed: lineNumber is repeated in location in {"priority":276,"message":"Missing OrigQuote field","bookID":"JUD","C":"1","V":"3","lineNumber":8,"location":" with ID 'yfa8' en JUD book package from unfoldingWord","extra":"TN"}
The text was updated successfully, but these errors were encountered:
@mandolyte Sorry that this caused problems for you. I usually only put assertions in the code where I want automatic notification of wrong programmer assumptions. The above example was a WIP wide refactoring where I had missed a few instances, so the asserts did exactly what I hoped for (and the failing code has now been fixed).
OTOH, I use logging for indicating program flow and also for simple debugging information.
So in summary, the asserts indicate programmer errors or wrong assumptions that do indeed require a fix.
At present, at least for me, failed assertions cause the app to stop and go into the debugger. If the failures are already validation messages, then maybe convert them to ordinary log messages? Here are the two example I ran into today:
The text was updated successfully, but these errors were encountered: