poco icon indicating copy to clipboard operation
poco copied to clipboard

Support log stack trace

Open JackyWoo opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. Add stack trace to Exception to help user understanding exceptions. When log exception user can get output like Java.

Describe the solution you'd like

  1. Add stack trace which implemented by libunwind or something else to Exception.
  2. Add log exception API to Logger

JackyWoo avatar Jul 19 '22 06:07 JackyWoo

@aleks-f @obiltschnig How about the idea? Expecting for reply.

JackyWoo avatar Aug 01 '22 02:08 JackyWoo

Idea is good and useful; implement it as a separate group of class(es).

Adding it to exceptions should be done carefully, if at all (exceptions already accept strings, so whoever needs/wants stack trace info can propagate it as a string):

  • a new constructor, taking stack trace
  • must be an optional exception content

I suggest you start with creating a stack trace class(es), then we can see how and whether to add that to exceptions.

aleks-f avatar Aug 01 '22 07:08 aleks-f

Thanks, I wonder whether we should introduce libunwind for stack trace catching?

JackyWoo avatar Aug 01 '22 08:08 JackyWoo

Well, any such embedding is a "double-edged sword" - on one side, (+) beside the mainstream linux and osx (and clang on windows), libunwind covers lots of platforms; however, by introducing it, (-) we'd be introducing yet another chunk of foreign code to be synced and maintained. (+)License (MIT) seems to be ok for poco embedding. (+/-)MSVC would have to be coded separately for windows support, but this is the case any way we go. I'd say yes, but let's wait and see what @obiltschnig has to say, if anything.

aleks-f avatar Aug 01 '22 12:08 aleks-f

Thanks. I will focus on the SocketReactor first.

JackyWoo avatar Aug 04 '22 06:08 JackyWoo

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Aug 05 '23 02:08 github-actions[bot]

This issue was closed because it has been inactive for 60 days since being marked as stale.

github-actions[bot] avatar Oct 05 '23 02:10 github-actions[bot]