Next: , Previous: , Up: Using the Dezyne locator to distribute runtime objects   [Contents] Custom dzn::illegal_handler

If you wish to not use the default dzn::illegal_handler, you can implement your own dzn::illegal_handler and store it in the locator. The default dzn::illegal_handler will then be overwritten and if an illegal assert occurs during the runtime of your application, the customized handler will be called. This is especially useful if your application consists of potentially dangerous hardware; if you can no longer guarantee the correctness of runtime software, you will want to shut down such hardware gracefully.

An alternative to using the illegal-handler to establish a safe pre-condition to terminating the application would be to write armour components to ensure that foreign code can never trigger an illegal. Armouring is a technique in Dezyne that can be used to guard control logic from spurious behaviour in foreign components; see <reference to Armouring documentation> for more information on this subject.