Log In    |    Knowledge Base    |    4D Home
Tech Tip: The new command "Current method name" in 4D version 6.7
Published On: May 4, 2001

Current method name is a valuable 4D command that allows you to find out which method is currently executing. This could help you to maintain your own log file for debugging purposes or to know from which method a customer is getting an error.

This command returns a value that is usable only from the method itself. This means that if you plan to generate a log file by using a generic method, you need to provide this value as a parameter to that generic method. Otherwise, executing this command from within your generic method will just return the generic method's name and not the method that it was called from.

The error handling method specified via an ON ERR CALL command cannot have any parameters passed to it when an exception occurs. However, you can still use the Current method name result by first placing its value into a process variable. When your error handling method is called by 4D, you can retrieve the value from this variable.