Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inaccurate and confusing error message #67

Open
pavel-kirienko opened this issue Nov 1, 2022 · 1 comment
Open

Inaccurate and confusing error message #67

pavel-kirienko opened this issue Nov 1, 2022 · 1 comment

Comments

@pavel-kirienko
Copy link
Member

Even if the uavcan namespace is available, you may get this error which is incorrect and badly misleading:

$ y sub 24:uavcan.nonexistent.nested
NotFoundError: Run `yakut compile <path>/uavcan` to compile DSDL namespace 'uavcan'

The problem is not that uavcan is not available (it is!) but rather that it doesn't contain uavcan.nonexistent.

If the last part .nested is removed, we get the correct error message:

NotFoundError: Could not locate nonexistent.*.* in module 'uavcan'
@pavel-kirienko
Copy link
Member Author

The culprit is here:

raise NotFoundError(make_usage_suggestion(namespaces[0])) from ex

The error message generated by make_usage_suggestion() is misleading and should be improved as follows:

  • Instead of a mere namespace name the function should accept the full name of the desired data type.
  • The error message should be more verbose, saying which data type is missing, and suggesting that perhaps the entire namespace needs to be recompiled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant