Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. ON ERROR RESUME NEXT

ON ERROR RESUME NEXT

Scheduled Pinned Locked Moved The Lounge
45 Posts 27 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D DaveAuld

    For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

    Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #8

    The modern version;

    catch
    {
    // all
    }

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

    R S L 3 Replies Last reply
    0
    • D DaveAuld

      For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

      Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

      S Offline
      S Offline
      stoneyowl2
      wrote on last edited by
      #9

      "IF THEN MAYBE", "DO SOMETHING" and "GO SOMEWHERE" have always had a special place in my heart.... MAYBEBOL

      L G 2 Replies Last reply
      0
      • L Lost User

        The modern version;

        catch
        {
        // all
        }

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        R Offline
        R Offline
        Richard Deeming
        wrote on last edited by
        #10

        Not quite - the modern version would require wrapping every single statement in its own "Pokémon exception-handling" block. Which would mean splitting all variable declarations from their assignments, since a variable declared inside a try block can't be used outside of that block. Which would also mean giving every variable some sort of default value, either when they're declared, or in the empty catch block for the first line that assigns them. And don't forget to update the properties of the global Err object, in case the user gave any thought to checking for errors on the following line, and didn't just let their code trundle on regardless and destroy the program state / database / computer / world. Having worked with VBScript many years ago, where this was the only form of error handling allowed, it's an horrendous construct. Whoever came up with the idea deserves a good beating with the clue-bat.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        L OriginalGriffO M 3 Replies Last reply
        0
        • S stoneyowl2

          "IF THEN MAYBE", "DO SOMETHING" and "GO SOMEWHERE" have always had a special place in my heart.... MAYBEBOL

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #11

          I like their error-handlers, at least it is honest.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          1 Reply Last reply
          0
          • L Lost User

            The modern version;

            catch
            {
            // all
            }

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            S Offline
            S Offline
            Stephen Hewitt
            wrote on last edited by
            #12

            That's more like ON ERROR BAIL.

            Steve

            1 Reply Last reply
            0
            • R Richard Deeming

              Not quite - the modern version would require wrapping every single statement in its own "Pokémon exception-handling" block. Which would mean splitting all variable declarations from their assignments, since a variable declared inside a try block can't be used outside of that block. Which would also mean giving every variable some sort of default value, either when they're declared, or in the empty catch block for the first line that assigns them. And don't forget to update the properties of the global Err object, in case the user gave any thought to checking for errors on the following line, and didn't just let their code trundle on regardless and destroy the program state / database / computer / world. Having worked with VBScript many years ago, where this was the only form of error handling allowed, it's an horrendous construct. Whoever came up with the idea deserves a good beating with the clue-bat.


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #13

              Richard Deeming wrote:

              Whoever came up with the idea deserves a good beating with the clue-bat.

              Probably someone who got paid per LOC.

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

              1 Reply Last reply
              0
              • D DaveAuld

                For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

                Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                M Offline
                M Offline
                Mark_Wallace
                wrote on last edited by
                #14

                I've worked at places where it's ON ERROR RESUME UPDATE. (You'll have to imagine the accents)

                I wanna be a eunuchs developer! Pass me a bread knife!

                1 Reply Last reply
                0
                • D DaveAuld

                  For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

                  Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                  K Offline
                  K Offline
                  kmoorevs
                  wrote on last edited by
                  #15

                  DaveAuld wrote:

                  just popped into my head

                  I mumble this when something goes wrong...of course the wife doesn't get it. :laugh: It's the be-all, catch-all of error handling constructs, and not a bad way to approach life sometimes! I can always apply a condition based on Err.Number! :laugh:

                  "Go forth into the source" - Neal Morse

                  1 Reply Last reply
                  0
                  • D DaveAuld

                    For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

                    Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #16

                    break;

                    The language is JavaScript. that of Mordor, which I will not utter here
                    This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a fucking golf cart.
                    "I don't know, extraterrestrial?" "You mean like from space?" "No, from Canada." If software development were a circus, we would all be the clowns.

                    1 Reply Last reply
                    0
                    • S stoneyowl2

                      "IF THEN MAYBE", "DO SOMETHING" and "GO SOMEWHERE" have always had a special place in my heart.... MAYBEBOL

                      G Offline
                      G Offline
                      Gary Wheeler
                      wrote on last edited by
                      #17

                      ON ERROR FORGET ABOUT IT

                      from MAYBEBOL seems to be most directly in the spirit of the OP.

                      Software Zen: delete this;

                      1 Reply Last reply
                      0
                      • D DaveAuld

                        For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

                        Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                        R Offline
                        R Offline
                        Ryan Peden
                        wrote on last edited by
                        #18

                        I like INTERCAL's ABSTAIN. You get statements like:

                        PLEASE ABSTAIN FROM CALCULATING

                        Also, to exit the program, you use:

                        PLEASE GIVE UP

                        The PLEASE is optional. If you don't use it enough, through, the compiler will reject your program for not being polite enough. You do have to be careful with it: using PLEASE too often will get your program rejected for excessive politeness.

                        M 1 Reply Last reply
                        0
                        • R Richard Deeming

                          Not quite - the modern version would require wrapping every single statement in its own "Pokémon exception-handling" block. Which would mean splitting all variable declarations from their assignments, since a variable declared inside a try block can't be used outside of that block. Which would also mean giving every variable some sort of default value, either when they're declared, or in the empty catch block for the first line that assigns them. And don't forget to update the properties of the global Err object, in case the user gave any thought to checking for errors on the following line, and didn't just let their code trundle on regardless and destroy the program state / database / computer / world. Having worked with VBScript many years ago, where this was the only form of error handling allowed, it's an horrendous construct. Whoever came up with the idea deserves a good beating with the clue-bat.


                          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                          OriginalGriffO Offline
                          OriginalGriffO Offline
                          OriginalGriff
                          wrote on last edited by
                          #19

                          You hold 'im, I'll hit 'im. Then we can swap places. Repeatedly.

                          Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                          1 Reply Last reply
                          0
                          • D DaveAuld

                            For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

                            Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                            Z Offline
                            Z Offline
                            ZurdoDev
                            wrote on last edited by
                            #20

                            The only people who complain about this statement are the same ones who didn't know how to use it properly. :-\

                            There are only 10 types of people in the world, those who understand binary and those who don't.

                            R 1 Reply Last reply
                            0
                            • Z ZurdoDev

                              The only people who complain about this statement are the same ones who didn't know how to use it properly. :-\

                              There are only 10 types of people in the world, those who understand binary and those who don't.

                              R Offline
                              R Offline
                              Richard Deeming
                              wrote on last edited by
                              #21

                              The only way to use On Error Resume Next properly is to never use it. :)


                              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                              M 1 Reply Last reply
                              0
                              • D DaveAuld

                                For some reason, that just popped into my head.......I wasn't even looking at anything code related, was watching the "Couch Commander" video :laugh: Anyway, the question is are there any other "statements" such as the one in the subject' in any other programming language that so eloquently and succinctly tell you exactly what it's doing.......? The more obscure the language the better. And if anyone says this is a programming question, which it is, but it's not, will get a skelped dock!

                                Dave Find Me On:Web|Youtube|Facebook|Twitter|LinkedIn Folding Stats: Team CodeProject

                                N Offline
                                N Offline
                                Nagy Vilmos
                                wrote on last edited by
                                #22

                                Just about any COBOL will fit that, `ADD 1 TO COUNT` for instance.

                                veni bibi saltavi

                                M 1 Reply Last reply
                                0
                                • R Richard Deeming

                                  You'd have to go a long way to beat the eloquence of this:

                                  $HODOR: hhodor? Hodor!? Hodor!? oHooodorrhodor orHodor!? d = HoDoRHoDoR () {
                                  hodor.hod('Hhodor? Hodor!? Hodor!? o HODOR!? orHodor!? d!');
                                  };

                                  hhodor? Hodor!? Hodor!? oHooodorrhodor orHodor!? d();

                                  Hodor Programming Language[^] :-D


                                  "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                  M Offline
                                  M Offline
                                  Mark_Wallace
                                  wrote on last edited by
                                  #23

                                  Richard Deeming wrote:

                                  Hodor Programming Language[^] :-D

                                  That would be funnier if it didn't look almost exactly like a lot of the Java code I've had to manage.

                                  I wanna be a eunuchs developer! Pass me a bread knife!

                                  1 Reply Last reply
                                  0
                                  • R Richard Deeming

                                    Not quite - the modern version would require wrapping every single statement in its own "Pokémon exception-handling" block. Which would mean splitting all variable declarations from their assignments, since a variable declared inside a try block can't be used outside of that block. Which would also mean giving every variable some sort of default value, either when they're declared, or in the empty catch block for the first line that assigns them. And don't forget to update the properties of the global Err object, in case the user gave any thought to checking for errors on the following line, and didn't just let their code trundle on regardless and destroy the program state / database / computer / world. Having worked with VBScript many years ago, where this was the only form of error handling allowed, it's an horrendous construct. Whoever came up with the idea deserves a good beating with the clue-bat.


                                    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                    M Offline
                                    M Offline
                                    Mark_Wallace
                                    wrote on last edited by
                                    #24

                                    Richard Deeming wrote:

                                    he modern version would require wrapping every single statement in its own "Pokémon exception-handling" block. Which would mean splitting all variable declarations from their assignments, since a variable declared inside a try block can't be used outside of that block. Which would also mean giving every variable some sort of default value, either when they're declared, or in the empty catch block for the first line that assigns them. And don't forget to update the properties of the global Err object, in case the user gave any thought to checking for errors on the following line, and didn't just let their code trundle on regardless and destroy the program state / database / computer / world

                                    Ah! Now I understand why you love VB so much!

                                    I wanna be a eunuchs developer! Pass me a bread knife!

                                    1 Reply Last reply
                                    0
                                    • R Richard Deeming

                                      The only way to use On Error Resume Next properly is to never use it. :)


                                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                      M Offline
                                      M Offline
                                      Mark_Wallace
                                      wrote on last edited by
                                      #25

                                      Not the best War Games paraphrase I've ever seen, but it'll do.

                                      I wanna be a eunuchs developer! Pass me a bread knife!

                                      1 Reply Last reply
                                      0
                                      • N Nagy Vilmos

                                        Just about any COBOL will fit that, `ADD 1 TO COUNT` for instance.

                                        veni bibi saltavi

                                        M Offline
                                        M Offline
                                        Mark_Wallace
                                        wrote on last edited by
                                        #26

                                        Well, PERFORM sthg VARYING FROM 1 BY 1 UNTIL COUNT > 5 could do with a little work, but your point is still 90% valid.

                                        I wanna be a eunuchs developer! Pass me a bread knife!

                                        1 Reply Last reply
                                        0
                                        • R Ryan Peden

                                          I like INTERCAL's ABSTAIN. You get statements like:

                                          PLEASE ABSTAIN FROM CALCULATING

                                          Also, to exit the program, you use:

                                          PLEASE GIVE UP

                                          The PLEASE is optional. If you don't use it enough, through, the compiler will reject your program for not being polite enough. You do have to be careful with it: using PLEASE too often will get your program rejected for excessive politeness.

                                          M Offline
                                          M Offline
                                          Mark_Wallace
                                          wrote on last edited by
                                          #27

                                          Does it have private and public statements, too? e.g:

                                          PRIVATE PLEASE SHAKE_IT_BABY

                                          I wanna be a eunuchs developer! Pass me a bread knife!

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups