Closed markusschloesser closed 1 year ago
If they don't seem to cause any other problems, we can comment out those assertions. I mean, I added them because we were troubleshooting, and I think that's a great way to (temporarily?) "document" your understanding of the code, and verify the understanding at runtime. "At this execution point in the code I expect there are never any devices on the selected track", for example.
Because there are cases where we see these assertions logged because they "failed", it means, my understanding of the code at that point is/was less than complete. However, because you didn't notice any issues "in session" after the errors were logged, it means my misunderstanding isn't/wasn't critical. I mean if in the case when there is at least one device on the track when the execution pointer passes through that block of code and the assertion error is logged, and then "nothing bad" happens, like "log vomit", then the mere fact that there were devices present when we (I) didn't expect it doesn't really matter. No harm. No foul. On the other hand, if you were investigating some error you encountered a bit later "in session" and scrolled up to find this assertion error logged, then the "misunderstanding" would be more important. The assertion error would indicate the presence of at least one device on the track when none was expected in that block of code likely lead directly to the other error (and thus needs further investigation into why there was a device on the track at that point when it wasn't expected).
edit
both of them not that often. Don't remember how to replicate (was in session)