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. Other Discussions
  3. The Weird and The Wonderful
  4. Unhandled exception message

Unhandled exception message

Scheduled Pinned Locked Moved The Weird and The Wonderful
data-structuresdebugginghelp
6 Posts 5 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 Offline
    D Offline
    david ribeiro
    wrote on last edited by
    #1

    Just making some changes on my project, found this pearl on a catch block which was the subject, wrapper with the exception message and stack trace: errormessages += "Fatal error. Please Restart. We are sorry." + sessionExp.Message + ";" + sessionExp.StackTrace;

    A G 2 Replies Last reply
    0
    • D david ribeiro

      Just making some changes on my project, found this pearl on a catch block which was the subject, wrapper with the exception message and stack trace: errormessages += "Fatal error. Please Restart. We are sorry." + sessionExp.Message + ";" + sessionExp.StackTrace;

      A Offline
      A Offline
      AspDotNetDev
      wrote on last edited by
      #2

      Not sure what the horror is. Looks like it is just accumulating error messages (though a list or StringBuilder would seem more appropriate). By the way, you may want to toss that code in a PRE block.

      [Forum Guidelines]

      1 Reply Last reply
      0
      • D david ribeiro

        Just making some changes on my project, found this pearl on a catch block which was the subject, wrapper with the exception message and stack trace: errormessages += "Fatal error. Please Restart. We are sorry." + sessionExp.Message + ";" + sessionExp.StackTrace;

        G Offline
        G Offline
        GibbleCH
        wrote on last edited by
        #3

        If this is .Net, the horror is using .Message instead of .ToString() which will already include the StackTrace

        A 1 Reply Last reply
        0
        • G GibbleCH

          If this is .Net, the horror is using .Message instead of .ToString() which will already include the StackTrace

          A Offline
          A Offline
          AspDotNetDev
          wrote on last edited by
          #4

          Not sure I would call that a horror either. The ToString might include the stack trace, but even if it does it probably doesn't have the message in front of the rest of the stack trace, as is the case with this example. If this is a log that is meant to be read by humans, it would seem smart to put the message ahead of the rest so people can avoid having to scan through the stack trace to get to the most important part.

          [Forum Guidelines]

          R 1 Reply Last reply
          0
          • A AspDotNetDev

            Not sure I would call that a horror either. The ToString might include the stack trace, but even if it does it probably doesn't have the message in front of the rest of the stack trace, as is the case with this example. If this is a log that is meant to be read by humans, it would seem smart to put the message ahead of the rest so people can avoid having to scan through the stack trace to get to the most important part.

            [Forum Guidelines]

            R Offline
            R Offline
            Richard A Dalton
            wrote on last edited by
            #5

            I think the "We are sorry" bit is the horror. You never admit liability. The correct message should read: "You screwed up the system again. Look here's a stack trace of all the functions you broke. Call the Helpdesk and apologise and maybe...just maybe we can get this sh*t working before Monday. You've made me miss my sons soccer game tomorrow. You do realise that don't you? He'll be heartbroken. He still hasn't recovered from the weekend you made me miss his brithday by trying to print an end of month report in the middle of the month. It's called the end of month for a reason you MORON. Do you care? Noooo, you're a user, you swan in here Monday to Friday, breaking systems when you feel like it. You'll probably spend the weekend fishing." -Rd

            Hit any user to continue.

            P 1 Reply Last reply
            0
            • R Richard A Dalton

              I think the "We are sorry" bit is the horror. You never admit liability. The correct message should read: "You screwed up the system again. Look here's a stack trace of all the functions you broke. Call the Helpdesk and apologise and maybe...just maybe we can get this sh*t working before Monday. You've made me miss my sons soccer game tomorrow. You do realise that don't you? He'll be heartbroken. He still hasn't recovered from the weekend you made me miss his brithday by trying to print an end of month report in the middle of the month. It's called the end of month for a reason you MORON. Do you care? Noooo, you're a user, you swan in here Monday to Friday, breaking systems when you feel like it. You'll probably spend the weekend fishing." -Rd

              Hit any user to continue.

              P Offline
              P Offline
              Prerak Patel
              wrote on last edited by
              #6

              That's awesome. I should have tried those messages in my college projects... :laugh:

              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