Skip to content

Use short function name in non-debug builds in error messages #3060

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

Merged
merged 1 commit into from
Jan 11, 2021

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Dec 8, 2020

Description

Prior to this, error message from an exception would look like below

In function af_err af_transpose_inplace(af_array, bool)
In file src/api/c/transpose.cpp:97

Earlier approach was hindering any useful log messages, especially from
runtime(like nvrtc) compilation phase, to be properly captured by
by the string returned by af_get_last_error function call.

Now it would look the same in debug builds but for release builds it
shall look like as following

In function af_transpose_inplace
In file src/api/c/transpose.cpp:97

Fixes: #3053

Changes to Users

Issues such as the ones mentioned in #3053 will be fixed.

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • [ ] Functions added to unified API
  • [ ] Functions documented

Prior to this, error message from an exception would look like below

    In function af_err af_transpose_inplace(af_array, bool)
    In file src/api/c/transpose.cpp:97

Earlier approach was hindering any useful log messages, especially from
runtime(like nvrtc) compilation phase, to be properly captured by
by the string returned by af_get_last_error function call.

Now it would look the same in debug builds but for release builds it
shall look like as following

    In function af_transpose_inplace
    In file src/api/c/transpose.cpp:97
@9prady9 9prady9 added the fix label Dec 8, 2020
@9prady9 9prady9 added this to the 3.8.1 milestone Dec 8, 2020
@9prady9 9prady9 requested a review from umar456 December 8, 2020 12:11
@9prady9 9prady9 merged commit 0efcbc0 into arrayfire:master Jan 11, 2021
@9prady9 9prady9 deleted the issue3053 branch January 11, 2021 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Error messages from NVRTC are truncated
2 participants