Re: Fourgen CASE Tools - Constraint Violations - FATAL Error
Posted in 1995
Richard Walther <richardw> wrote: >Has anyone ever run into/resolved a Fourgen CASE Tool/Informix Constraint >problem that involves a FATAL error? Whenever a user attemts to insert/update >data that violates an Informix constraint the error message displayed is: > "Fatal Error: Program terminated." >instead of actually notifying the user that a constraint has been violated. Is >this something that Fourgen has left for developers to deal with themselves, or >has some effort been made to show a more realistic error message. > I know how to watch for the error within the error_handler but wish not to >start modifying the canned tool...(Although that may actually be the final >solution.) Yep...ran into it rather ignominiously. I found that in my situation it was simpler to simply put the checking and forcing at the field entry level, rather than check for the error in error_handler or in the llx_add or llx_update function. Fourgen has pretty much relegated this to the developer in the case tools. Your best route is probably to create an llh_chkinput or and lld_chkinput to check for integrity violations if you _must_ do it after the user has accepted the input. This function provides for returning a -1 value which tells the Fourgen library code to return to input mode on the current data. It _is_ a PITA to deal with at the application level, but it is still _much_ better to have the checking than to have bad data put in the table(s) because of an input-checking oversight. Good luck. Mike Lemon