Skip to content

Clean up exception messages (internal error) #1188

Description

@shehzan10

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)

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions