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

Support configurable suppression of compact and full stack trace #44

Closed
aryoda opened this issue May 20, 2019 · 2 comments
Closed

Support configurable suppression of compact and full stack trace #44

aryoda opened this issue May 20, 2019 · 2 comments

Comments

@aryoda
Copy link
Owner

aryoda commented May 20, 2019

Not everybody wants to see the full or compact stack trace (or any at all) in case of thrown conditions. The condition message may be enough.

Add a possibility to control the suppression of the compact and full stack trace (one of them or both or none).

Related to issues

@aryoda
Copy link
Owner Author

aryoda commented May 20, 2019

Implementation proposal:

Add two more arguments to the tryCatchLog and tryLog functions:

  1. suppress.compact.stack.trace
  2. suppress.full.stack.trace

The default values are fetched from the R options (eg. suppress.full.stack.trace = getOption("tryCatchLog.suppress.full.stack.trace", TRUE)).

Open questions:

  1. Does it make sense to allow different suppression settings for each condition type (error, warning, message...)? This would span a configuration "matrix".

  2. Are there other possible settings beyond suppression (eg. "show only the exact location without a call stack...")? Then the arguments should have a different name (not "suppress.*") and be of type string. How to specify the allowed setting values then? Via base::match.arg functionality?

@aryoda aryoda added the work in progess is currently in the implementation phase label Sep 29, 2019
aryoda added a commit that referenced this issue Sep 29, 2019
Also closes (rejects) #5 (suppress empty compact stack trace) and implements #25 (add option for include.full.call.stack)

Unit tests are still missing (must still be implemented)
@aryoda
Copy link
Owner Author

aryoda commented Sep 29, 2019

tryCatchLog and tryCatch now have two additional arguments named
include.full.call.stack and include.compact.call.stack which can also be configured globally
via options.

Unit tests are still missing. Merging back of the feature branch #44 into master will be done after success unit tests...

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