When using the c api you need to setup try/catch blocks to print out the error text for the exceptions thrown when there are typos in worker names or properties.
It would be nice if there was a log level to print these out without catching them for debugging purposes. You can see these in log level 8 but there is also much more information then is needed in this log level.
c API or C++ API?
Inside a component or outside a component.
Exceptions are thrown when no continuation is possible.
Would it be helpful to have a more convenient way to catch the exceptions and print errors?
Perhaps a code example would help show what is currently "clumsy".
ocpi_app = new OA::Application("my_app.xml" , NULL);
OA::ExternalPort &temp_inPort = ocpi_app->getPort("in");
OA::ExternalPort &temp_outPort = ocpi_app->getPort("out");
ocpi_inPort = &temp_inPort;
ocpi_outPort = &temp_outPort;
catch (std::string &e)
printf("OPENCPI Exception thrown: %s\n", e.c_str());
specificly if i have a typo in the name of a worker or my OCPI_LIBRARY_PATH is wrong and i don't have this try catch block setup i get no error output.
Just says exception thrown and crashes no feedback of why without adding code.
Guidance should be put into the app developer guide about proper catching.
Also, more control of logging of exceptions may be useful (i.e. the log level at which
the exception should be logged?)