• tauonite@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      12 hours ago

      I once tried vibe coding a web app using GitHub Copilot. That motherfucker wrapped every single endpoint with

      try:
          ...
      except Exception:
          return "An error occurred"
      

      What the fuck is wrong with you Copilot? This piece of shit trying to hide all the errors. If I don’t know there are errors then there aren’t errors. Apparently

      • ChickenLadyLovesLife@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        9 hours ago

        I wish to god Visual Basic was still around so Copilot et. al. could get infected with ON ERROR RESUME NEXT statements. Or its under-appreciated but vastly more horrific cousin ON ERROR RESUME.

        • pinball_wizard@lemmy.zip
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          5 hours ago

          I might make that my first coding project after I retire. I bet I can code up a global import that implements “ON ERROR RESUME” in a couple of modern languages…

    • Thorry@feddit.org
      link
      fedilink
      arrow-up
      24
      ·
      edit-2
      21 hours ago

      // 🤦 You are totally right! Simply logging the 🚨 error to the console isn't proper error handling. 🫣 We now throw an exception instead. throw new ApplicationException(error);