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. Cannot print exception string because Exception.ToString() failed.

Cannot print exception string because Exception.ToString() failed.

Scheduled Pinned Locked Moved The Lounge
comperformance
14 Posts 9 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.
  • M Offline
    M Offline
    Marc Clifton
    wrote on last edited by
    #1

    hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

    Latest Articles:
    A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

    P S R CPalliniC B 7 Replies Last reply
    0
    • M Marc Clifton

      hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

      Latest Articles:
      A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

      P Online
      P Online
      PIEBALDconsult
      wrote on last edited by
      #2

      How about ((Exception) myException).Tostring() ?

      M 1 Reply Last reply
      0
      • M Marc Clifton

        hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

        Latest Articles:
        A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

        S Offline
        S Offline
        Steve Raw
        wrote on last edited by
        #3

        Ha! That's funny. What language are you programming in? One of the funniest exception messages I've seen reads: "Out of memory: Kill process, score, or sacrifice child". :laugh: Another one I've seen reads: "Keyboard Not Found. Press F1 to Resume". :laugh:

        M 1 Reply Last reply
        0
        • M Marc Clifton

          hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

          Latest Articles:
          A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

          R Offline
          R Offline
          raddevus
          wrote on last edited by
          #4

          Is it .NET Core? Exception.ToString() failed. · Issue #5203 · dotnet/runtime · GitHub[^]

          M 1 Reply Last reply
          0
          • M Marc Clifton

            hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

            Latest Articles:
            A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #5

            All my life waiting for that happen!

            "In testa che avete, Signor di Ceprano?" -- Rigoletto

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • P PIEBALDconsult

              How about ((Exception) myException).Tostring() ?

              M Offline
              M Offline
              Marc Clifton
              wrote on last edited by
              #6

              I'm not throwing the exception -- I think it's Dapper and I think it's related to "out of memory" even though I have plenty.

              Latest Articles:
              A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

              J T 2 Replies Last reply
              0
              • S Steve Raw

                Ha! That's funny. What language are you programming in? One of the funniest exception messages I've seen reads: "Out of memory: Kill process, score, or sacrifice child". :laugh: Another one I've seen reads: "Keyboard Not Found. Press F1 to Resume". :laugh:

                M Offline
                M Offline
                Marc Clifton
                wrote on last edited by
                #7

                C#. And yeah, "sacrifice child" is rather novel! I remember seeing those "keyboard not found. Press F1 to resume" messages in old DOS systems. Those were the days!

                Latest Articles:
                A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                1 Reply Last reply
                0
                • R raddevus

                  Is it .NET Core? Exception.ToString() failed. · Issue #5203 · dotnet/runtime · GitHub[^]

                  M Offline
                  M Offline
                  Marc Clifton
                  wrote on last edited by
                  #8

                  Nope, plain .NET 4.7.2. I think it's related to Dapper blowing up in a bad way, lol.

                  Latest Articles:
                  A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                  1 Reply Last reply
                  0
                  • M Marc Clifton

                    I'm not throwing the exception -- I think it's Dapper and I think it's related to "out of memory" even though I have plenty.

                    Latest Articles:
                    A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #9

                    In Java/Net you can get an out of memory error for reasons other than the totality of memory that exists for the application.

                    1 Reply Last reply
                    0
                    • M Marc Clifton

                      hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

                      Latest Articles:
                      A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                      B Offline
                      B Offline
                      BernardIE5317
                      wrote on last edited by
                      #10

                      the exception message in case of my own coding error reads "internal error apologies if computer exploded please do not take legal action as am saving pennies to purchase Magnum Dynalab/VTL/Harbeth/ATOHM/Shunyata Research system"

                      1 Reply Last reply
                      0
                      • M Marc Clifton

                        hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

                        Latest Articles:
                        A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                        J Offline
                        J Offline
                        jschell
                        wrote on last edited by
                        #11

                        The general problem is that one can get an out of memory problem even when there is seemingly plenty of memory for the application. I believe this can happen in Java. [Edit] (See other post - it can happen on Java.) I know it can happen in .Net. For .Net it happens when the Large Object Heap runs out of memory. I think there can be other cases as well. Now why would that matter for the code given? Because the string it attempts to build would result in an object that would go on the Large Object Heap. In my experience I saw this when the application was doing a lot of transfers of files by using in memory copies of the files between different layers. Due to over generalization of course. Insisting on passing streams between layers and then each layer copied the stream into memory and it went down the chain. Then when one adds threads to that it starts chewing up memory. In terms of the Exception class (or children) I have seen layers that caught an exception, then used that exception stack trace to create the message for the Exception that it threw. Which might be useful and even required if going over the wire it will lead to very large Exception messages. The Large Object Heap cutoff is the rather odd number of 85,000. [Edit] - Java example post The Lounge[^]

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          hahahahaha. Never seen that one, and no, I don't have a custom exception handler.

                          Latest Articles:
                          A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                          R Offline
                          R Offline
                          RickZeeland
                          wrote on last edited by
                          #12

                          I think it's exception-al :-\

                          1 Reply Last reply
                          0
                          • M Marc Clifton

                            I'm not throwing the exception -- I think it's Dapper and I think it's related to "out of memory" even though I have plenty.

                            Latest Articles:
                            A Lightweight Thread Safe In-Memory Keyed Generic Cache Collection Service A Dynamic Where Implementation for Entity Framework

                            T Offline
                            T Offline
                            TNCaver
                            wrote on last edited by
                            #13

                            I've seen out of memory errors when it was actually a full disk drive. Not with Dapper, but with other scenarios.

                            There are no solutions, only trade-offs.
                               - Thomas Sowell

                            A day can really slip by when you're deliberately avoiding what you're supposed to do.
                               - Calvin (Bill Watterson, Calvin & Hobbes)

                            J 1 Reply Last reply
                            0
                            • T TNCaver

                              I've seen out of memory errors when it was actually a full disk drive. Not with Dapper, but with other scenarios.

                              There are no solutions, only trade-offs.
                                 - Thomas Sowell

                              A day can really slip by when you're deliberately avoiding what you're supposed to do.
                                 - Calvin (Bill Watterson, Calvin & Hobbes)

                              J Offline
                              J Offline
                              jschell
                              wrote on last edited by
                              #14

                              Ah yes! I had forgotten about that. I saw that with a Java app. The OS Virtual Memory was mapped unto the same drive/folder where the application log was being written. So after the log had been writing for a while there was no more virtual memory. Delete the logs and the problem goes away. Quite annoying and unexpected problem.

                              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