On Saturday, 4 June 2022 at 17:17:13 UTC, Ola Fosheim Grøstad wrote:
Why can't Error unwind the stack properly?

It does normally, but it doesn't destruct objects when those are in `nothrow` functions.

Nothrow functions don't throw, so have no cleanup.

You could argue it is strange that assert throws...

In a not-miniscule service you can be pretty certain that some ±1 bugs will be there, especially in a service that is receiving new features on a regular basis.

Most wont throw a Error though. And typical services have canary releases and rollback.

So you just fix it, which you have to do anyway.

Not saying its perfect, but if you only use asserts when you have to, and handle other things using the type system, it doesn't actually happen all that often.

  • Comparing Exceptions and Erro... Steven Schveighoffer via Digitalmars-d-learn
    • Re: Comparing Exceptions... Ali Çehreli via Digitalmars-d-learn
      • Re: Comparing Except... Steven Schveighoffer via Digitalmars-d-learn
        • Re: Comparing Ex... Ali Çehreli via Digitalmars-d-learn
        • Re: Comparing Ex... Ola Fosheim Grøstad via Digitalmars-d-learn
          • Re: Comparin... Sebastiaan Koppe via Digitalmars-d-learn
            • Re: Com... Ola Fosheim Grøstad via Digitalmars-d-learn
              • Re:... Sebastiaan Koppe via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Steven Schveighoffer via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Adam Ruppe via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Adam D Ruppe via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
              • Re:... Ali Çehreli via Digitalmars-d-learn
                • ... Ola Fosheim Grøstad via Digitalmars-d-learn
                • ... Sebastiaan Koppe via Digitalmars-d-learn

Reply via email to