The model should handle errors in a forgiving way. Avoid crashing or triggering assertions; instead, log an error message and try to continue anyway. If necessary, halt the simulator, but allow the user to continue manually.
There are three different kinds of errors that should be reported by a Simics device:
In some cases it is sufficient to give a warning for this kind of situation, for example if the model returns approximate or invented values.
Simics has extensive support for logging, allowing you to assign the output to different message categories, and different levels of verbosity. See the DML Reference Manual and the Simics Reference Manual for details. Logging is mostly used during development and debugging of the model, but is also useful to aid inspection of the device state during actual simulation.
Always use detailed error messages. Often, the error messages are the only source of information when a bug is reported by another user. It is not certain that the execution can be repeated, or that the developer will have access to the same setup.