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 - emessage() return the message associated with the last error http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 emessage()          Return the message associated with the last error
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   func char emessage extern

 Arguments
   None.

 Return
   An error message string.

 Description
   The emessage() function returns the error message associated with the
   last runtime error condition.

   The Force runtime library considers any error entering the runtime error
   system as fatal. The emessage() and imessage() functions are diagnostic.

   If the emessage() function is linked with an application, the resulting
   code size increases by about 3 Kbytes because all text constants
   containing the available error messages are linked as well.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   //  Have an error procedure print a diagnostic message.
   
   proc ErrorProc
   ? "Runtime error", istr( __errcode )
   ? emessage()
   quit 1
   endproc
   
   proc Test_emessage
   on error do ErrorProc
   pickclear( 0 )        // generate a runtime error
   endproc

   proc main
   Test_emessage()
   endproc

See Also: imessage() on error do

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