Skip to content

Streaming values into NTA_THROW does not work. #753

@dkeeney

Description

@dkeeney

After the Exception code cleanup PR #742 the error messages streamed into NTA_THROW no longer work.

  try {
    NTA_THROW << "This error msg";
  } catch (const Exception &e) {
    EXPECT_STREQ(e.getMessage(), "This error msg");
  }

I added this to the end of ExceptionTest.hpp and it fails. e.getMessage() is empty.
Tried this on Windows 10 using MSVC 2019.

But what I really want is something like: e.what() to return

    Exception:  <full path to module>(<line number>) message:  <message goes here>

It is not obvious to me what changed that broke it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcodecode enhancement, optimization, cleanup..programmer stuff

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions