Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - on neterr do install network error handler routine http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 on neterr do        Install network error handler routine
------------------------------------------------------------------------------
 Syntax
   on neterr do xProc

 Arguments
   xProc is a function to install as network error handler.

 Description
   The on neterr do command causes execution of xProc when a network error
   occurs at runtime.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc NetErrorProc
   vardef
      uint uSel
   enddef
   uSel := alert( "Network error " + istr( neterror() ), ;
      " Exit ; Retry ", RED_WHITE, BLUE_YELLOW )
   // perform appropriate actions depending on the neterror() code and
   // the user's selection
   endproc
   
   proc Test_onneterrdo
   on neterr do NetErrorProc          // install custom error handler
   // here open files on a network
   endproc

   proc main
   Test_onneterrdo()
   endproc

See Also: on error do

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson