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

Misleading DimensionError message #728

Open
sostock opened this issue May 31, 2024 · 0 comments
Open

Misleading DimensionError message #728

sostock opened this issue May 31, 2024 · 0 comments

Comments

@sostock
Copy link
Collaborator

sostock commented May 31, 2024

In the following, conversion from a Time quantity to a Power*Time quantity fails (as it should), but the error message claims that the dimensions Time and Time are incompatible:

julia> convert(typeof(1.0u"dBm*s"), 1u"s")
ERROR: DimensionError: s and 1 s are not dimensionally compatible.
[]

This is because the error message only considers the linear unit s, not the logarithmic dBm. This is due to using U() in the following line:

throw(DimensionError(U(),x))

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

No branches or pull requests

1 participant