Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get procedure names 1

Status
Not open for further replies.

Fortu

Programmer
Apr 13, 2010
3
DE
Hi there,

I've got a little question regarding procedure names in Clarion.

I would like to create a debug procedure which presents a popup with the error message. I would like to show from which procedure the message was sent so I've asked myself if there is a way to get the procedure name instead of writing it everytime I call my debug procedure (e.g. something like "DebugMessage(Procname(),ERROR()) instead of "DebugMessage('procedurename', ERROR()).

Hope someone can help me :)

 
Hi!

If you are using the ABC template chain, there is an ErrorClass object called GlobalErrors which has a property for Procedure Names and gets set at the beginning of every procedure. So, you can use ::

Code:
DebugMessage(GlobalErrors.GetProcedureName(), ERROR() & ' [' & ERRORCODE() & ']')

Regards
 
Hi ShankarJ,

thank you for your answer :) I'm not using the ABC template, but afaik there should be a possibility to implement ABC classes in legacy code.

Fortu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top