eclipse / xacc

XACC - eXtreme-scale Accelerator programming framework
https://xacc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
163 stars 84 forks source link

[unitaryhack] feat: try-catch on plugin loading #545

Open anushkrishnav opened 2 years ago

anushkrishnav commented 2 years ago

Added a try-catch block inside the plugin loading loop to handle load failure Issues #517

amccaskey commented 2 years ago

Hey @anushkrishnav a few things here. First off you need to make sure that you sign your commits and that your email in the signature matches the email on your Eclipse account. You need to have an Eclipse account and make sure you go in and sign the contributor licensing agreement. Without this the PR will not pass the IP checks.

Next thing - the current code commit you have will not address the issue. The plugin loading error is happening at the Start() method invocation. It is wrapped in a try catch, we really just need that snippet to be updated to throw a warning instead of an error (which causes the framework to stop). A warning here will let the framework continue running, but will just not have the erroneous plugin available.

amccaskey commented 2 years ago

Though - you might also keep a try / catch around the InstallBundles calls too. Just make sure you issue a warning instead of an error.

anushkrishnav commented 2 years ago

Hey @anushkrishnav a few things here. First off you need to make sure that you sign your commits and that your email in the signature matches the email on your Eclipse account. You need to have an Eclipse account and make sure you go in and sign the contributor licensing agreement. Without this the PR will not pass the IP checks.

Next thing - the current code commit you have will not address the issue. The plugin loading error is happening at the Start() method invocation. It is wrapped in a try catch, we really just need that snippet to be updated to throw a warning instead of an error (which causes the framework to stop). A warning here will let the framework continue running, but will just not have the erroneous plugin available.

SO basically instead of a xacc:error it needs to use xacc::exception

amccaskey commented 2 years ago

Instead of xacc::error it should be xacc::warning.

anushkrishnav commented 2 years ago

Done