| 34 | #include <exception> |
| 35 | |
| 36 | int main(int argc, char *argv[]) { |
| 37 | if (argc < 2) { |
| 38 | std::cerr << "Must supply a plugin name to load." << std::endl; |
| 39 | return 1; |
| 40 | } |
| 41 | osvr::pluginhost::RegistrationContext ctx; |
| 42 | |
| 43 | try { |
| 44 | std::cout << "Trying to load plugin " << argv[1] << std::endl; |
| 45 | ctx.loadPlugin(argv[1]); |
| 46 | std::cout << "Successfully loaded plugin, control returned to host " |
| 47 | "application!" << std::endl; |
| 48 | return 0; |
| 49 | } catch (std::exception &e) { |
| 50 | std::cerr << "Caught exception tring to load " << argv[1] << ": " |
| 51 | << e.what() << std::endl; |
| 52 | return 1; |
| 53 | } |
| 54 | std::cerr << "Failed in a weird way - not a std::exception." << std::endl; |
| 55 | return 2; |
| 56 | } |
nothing calls this directly
no test coverage detected