Results 1 to 2 of 2

Thread: [E+/E++] Error Handling application (Add to any E+ application)

  1. #1

    Thread Starter
    Hyperactive Member ..:RUDI:..'s Avatar
    Join Date
    Aug 2005
    Location
    Yorkshire, England! c0d: Da Vinci
    Posts
    344

    [E+/E++] Error Handling application (Add to any E+ application)

    This example is designed put to use our simple error handling application, using the Revision 4 syntax, all users should have this in their applications as it is almost a must if your program couls generate errors, the simple code takes up only 5 lines of your application and will stop your users from getting nasty errors from your programs...

    *I have nicely annotated the code for you

    *Please note that you must have
    Code:
    ActivateObjects.True and
    ObjectCreation.True
    before any other code in your project...
    Code:
    CreateErrorHandler.True ++Creates the Error Handler Object
    if(ErrorHandler returns *.True) then ++Starts the if...then statement of finding an error
    halt() ++If an error is found, this halts your program
    else ++Only here to complete an E++ If...then statement with no event for no error
    endif ++Ends the if...then statement
    Repeat(pr4,pr3,pr2,pr1).True and ++Repeats the 4 previous lines
    define loopprevious(inf.) ++Loops the 4 previous lines constantly



    My Personal Home | MageBB Home | Elders Online
    Yes, Noteme is my father.

  2. #2

    Thread Starter
    Hyperactive Member ..:RUDI:..'s Avatar
    Join Date
    Aug 2005
    Location
    Yorkshire, England! c0d: Da Vinci
    Posts
    344

    Talking Re: [E+/E++] Error Handling application (Add to any E+ application)

    This code is un-tested but can probably make some errors to try the above code

    + Defines a change of code block (Ignored by Compiler)

    Code:
    ActivateObjects.True and
    ObjectCreation.True
    +
    CreateErrorHandler.True ++Creates the Error Handler Object
    if(ErrorHandler returns *.True) then ++Starts the if...then statement of finding an error
    halt() ++If an error is found, this halts your program
    else ++Only here to complete an E++ If...then statement with no event for no error
    endif ++Ends the if...then statement
    Repeat(pr4,pr3,pr2,pr1).True and ++Repeats the 4 previous lines
    define loopprevious(inf.) ++Loops the 4 previous lines constantly
    +
    PrintText(error) and ++This will run 2 commands at the same time, looped forever, hopefully causing memory loss, causing the E+ interpreter to crash!
    PrintText(neous) and
    Repeat(pr2,pr1).True and
    define loopprevious(inf.)
    I'm good at causing compile errors in any language



    My Personal Home | MageBB Home | Elders Online
    Yes, Noteme is my father.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width