Archived issue #0032324
Modeling Algorithms - Improve BOPAlgo_Options::DumpErrors() output
Description
The BOPAlgo_Options::DumpErrors method is currently printing error codes to output.
In order to get human-readable errors, you have to perform the following manipulations:
which is not a very convenient way.
In order to get human-readable errors, you have to perform the following manipulations:
const auto& fails = bop.GetReport()->GetAlerts(Message_Fail);
for (Message_ListOfAlert::Iterator it(fails); it.More(); it.Next())
{
Message_Msg msg(it.Value()->GetMessageKey());
const auto text = msg.Get();
}
which is not a very convenient way.
Steps to reproduce
BOPAlgo_BOP bop;
bop.AddArgument(object);
bop.AddTool(tool);
bop.SetOperation(operation);
bop.Perform();
std::stringstream errors;
if (bop.HasErrors())
{
bop.DumpErrors(errors);
}
bop.AddArgument(object);
bop.AddTool(tool);
bop.SetOperation(operation);
bop.Perform();
std::stringstream errors;
if (bop.HasErrors())
{
bop.DumpErrors(errors);
}
Public activity
No public notes
Participants are labeled by their role within this record.