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

Clean up exception messages (internal error) #1188

Closed
shehzan10 opened this issue Dec 29, 2015 · 0 comments
Closed

Clean up exception messages (internal error) #1188

shehzan10 opened this issue Dec 29, 2015 · 0 comments
Assignees
Labels
Milestone

Comments

@shehzan10
Copy link
Member

An example of exception messages being thrown currently is:

[ RUN      ] Approx1/3.Approx1ArgsInterpCubic
In function /workspace/af_branches/devel/src/api/c/approx.cpp(56):
Invalid argument at index 3
Expected: (method == AF_INTERP_LINEAR || method == AF_INTERP_NEAREST)

There are 2 problems with this:

  1. It gives the user no information about which function is actually throwing the exception
  2. Users using the installer version are seeing paths from the installer projects on CI.

Fix this by changing the error message to include the function name, and only use the base file name along with line number. The above would change to:

[ RUN      ] Approx1/3.Approx1ArgsInterpBilinear
In function af_err af_approx1(void**, af_array, af_array, af_interp_type, float)(approx.cpp:56):
Invalid argument at index 3
Expected: (method == AF_INTERP_LINEAR || method == AF_INTERP_NEAREST)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants