Error Trapping
- Posted by Ferlin <ferlin at SANDW.NET> May 12, 1999
- 390 views
Hello All, A while back I left a message on this list about trapping errors in euphoria, it seems like someone (Can't seem to remember who) replied with some source code on how to accomplish the task. In some languages there is a Trap() function or On_Error() function to accomplish what I need, but I can't seem to find the code that was left or any thing similar. Here's the situation, I have a procedure such as: global procedure My_Procedure(sequence Obj) puts(1,"You sent " & Obj & " to My_Procedure") end procedure If the procedure is called like this My_Procedure(buffer) all is fine, but if it is called like this My_Procedure() the program BOMBS with My_Procedure() needs 1 arguments, not 0 I would like to capture this Error and perform and Error Routine, rather than have the program stop. This is just a quick example, but I would like to Trap different kinds of Errors. If euphoria doesn't have a function to do this, then MAYBE Rob could add it to the Wish List :) Thanks in Advance, + + + Rev. Ferlin Scarborough - Centreville, Alabama - USA email: ferlin at sandw.net email: ferlin at email.com