Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nesting error
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00481455
Message ID:
00481456
Views:
10
>I am trying to save the following error routine code in my method and I keep getting an error saying "nesting error". The code is as follows
>
>sour = k+f &&  source location of files defined
>dest = l+c &&  destination location of files defined
>* Save the original error handler
>lcOldOnError = ON("ERROR")
>* Issue ON ERROR with the name of a procedure
>ON ERROR DO errhandler  with error(), message()
>rename (sour) to (dest)
>ON ERROR &lcOldOnError
>	
>procedure errhandler
>                                local aErrInfo[1],qt
>				aerror(aErrInfo)
>				qt = aErrInfo[1,2]
>				qt = qt+' '
>				messagebox(qt+f,0,'error moving tofile')
>				continue_on = .f.
>				release aErrInfo
>endproc
>
>
>Can I not go to error handling paragraph call errhandler if I code it as above in one of my methods?
>
>Thanks
>
>Nick Patel

Nick,

VFP doesn't allow nested function/procedures in methods.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform