How do Lazarus users handle exceptions in procedures which are running in data modules?
A lot of the guides and examples demonstrate raising exceptions, which generally display dialogs to the user that an exception has occurred. But what is the best way to handle them if they occur inside data modules as they may not have a user interface, or are even not supposed to have any, but then somehow communicate the exception back to the user interface is required? In my view it is either by passing a var parameter to the procedure in the data module which returns some information about the error, or changing the procedure into a function and return info about the error in the result. On the other hand using functions messes up the reading of the program because it make the return values appear to be the subject of the computations. What are the best practices in Lazarus or Delphi with dealing with this kind of situation? Are there some frameworks for handing this type of problem? -- Frank Church ======================= http://devblog.brahmancreations.com -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
