4DQuiz


OT SetErrorHandler View from small screen devices!  

OT SetErrorHandler version 1 modified version 2.0

OT SetErrorHandler(inNewHandler) String

Parameter Type Description

inNewHandler String Name of a 4D method to execute

Function result String The name of the previous error

handler

Discussion

OT SetErrorHandler sets the action to perform when ObjectTools encounters an error. The previous error handler is returned.

By default, action is taken when an error occurs.

If you pass the name of an existing 4D method in inHandler, that method will get called when an error occurs. The method must take two String parameters. The first parameter will contain a description of the error that occurred. The second parameter will contain the name of the ObjectTools method that was called when the error occurred.

Note If you put a TRACE statement at the end of your error handler method, when an error occurs the 4D debugger will come up. If you then step one line, you will be at the line after the one that caused the error.

Whether or not an error handler is set, whenever an error occurs the OK variable is set to zero.

OT SetErrorHandler returns the old handler so that you may dynamically change the error handling within your code.



Topics of Interest
Object Utility Routines
Error Handling
 

Published date: Mon, 31 Jul 2006 00:34:46 GMT   → View XML Version

Edit this page now

© 2005 - 2006 4dquiz.com, All trademarks accepted. All Rights Reserved!
Site Index