Skip to content

program still abort() or exit() with try catch #1541

@mslovy

Description

@mslovy

I use try catch like below:

while(true) {
          try {
              jsonMsg = json::parse(msg);
          }
          catch(exception& e) {
              ldout << "error message: " << e.what() << endl;
              continue;
          }
}

I expect the program continue to be executed and then processs next msg. but after print out the error message such as parse error. The program abort() or exit(), can anyone give some suggestion about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: questionstate: needs more infothe author of the issue needs to provide more detailsstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions