Error Handling in CAB Applications
Error handling in a CAB application can be tricky. Because the ModuleLoaderService loads the CAB application, if there is an error that isn't handled in the application, the ModuleLoaderService throws an error, effectively hiding the true error in the application. Because of this, debugging is a more complicated process, as you have to run through more amounts of code to find the problem.
Naturally, developers have assumptions though; we know our code usually pretty good, and have ideas about what was changed from the last time when it did work. Though, this assumes that the problem is from our own code, though in multi-developer projects, the true error may be harder to find.
As such, this relies on the importance of using Debug.Assert statements in your code. If it detects a problem with a value, it notifies you with the message you provided, stating where the problem was found. This is a way, when debugging, to find things not normally found. It is an essential in the war against errors, especially in complex applications.
Comments