[bug] raising ConanInvalidConfiguration from pre_validate hook propagates exception · Issue #18384 · conan-io/conan · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def pre_validate(conanfile):
if some_condition_external_to_the_recipe:
raise ConanInvalidConfiguration("Raised from pre_validate")
The expectation is that this behaves as if exception was raised from within the validate() method.
Instead, the exception is propagated all the way to the top
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
With a hook like this:
The expectation is that this behaves as if exception was raised from within the
validate()
method.Instead, the exception is propagated all the way to the top
The problem is here:
conan/conans/client/graph/compute_pid.py
Lines 74 to 85 in cc258fb
The hooks should be invoked from within the try/except clause
How to reproduce it
No response
The text was updated successfully, but these errors were encountered: