Question about calling a non-existent procedure


#1

If a procedure calls a procedure which doesn’t exist, the calling procedure stops but gives no error message. An error message would be useful,


#2

It does give an error message.If the procedure that contains the error is open, the error message will appear in the status area.

If the procedure window is closed, an error dialog will appear, or the Error Detail window if you have enabled it.


#3

Strange - the calling procedure is my .Initialize.

If I trigger the .Initialize by running a procedure which calls it, I get the error message. But, if I open the file by double-clicking on it, there is no message. Can you please test that?

I have the Enable Advanced Error Dialog setting checked and it doesn’t open either in the second case.


#4

Panorama X runs the .Initialize procedure as a timer procedure, so by default errors aren’t displayed at all. I may revisit that (it wasn’t really intentional), but for now you could code your procedure like this if you want to see error messages.

try
    main code of procedure
catch
    message info("error")
endcatch

More strange behaviour by the .Initialize procedure
#5

Thanks, I’ll try that.


#6

causes an error


#7

Well sure – I meant that you should put whatever code you have now in the procedure into that section, for example

try
    fileglobal alpha,beta
    alpha="something"
    beta="something"
    call someOtherProcedure
catch
    message info("error")
endcatch