profanity
profanity copied to clipboard
Change assert behavior
Currently, we have many "asserts" in a code that would cause a crash and not every time it is possible to reproduce, as well as dump might be unavailable. I propose to use wrapper over a default "assert" (or even a custom solution) which would add logging, which can provide us additional data on the issues.
@sjaeckel @pasis , I would gladly hear your opinion on this considering your level of expertise in deep topics as such.
wrappers around asserts or abort() calls is a common solution. Just a simple example which allows you to print any info: https://github.com/pasis/pppoat2/blob/master/src/trace.h#L101 . You can also print the stacktrace, but I don't have quick example atm.
wrappers around asserts or abort() calls is a common solution. Just a simple example which allows you to print any info: https://github.com/pasis/pppoat2/blob/master/src/trace.h#L101 . You can also print the stacktrace, but I don't have quick example atm.
That's exactly what I was thinking. Printing a stack trace :) Thanks for sharing.
I am also thinking about wrapping the Profanity in something like breakpad in the future so we can reliably get crash data every time (ofc with users' consent, but even with manual data sending it would be ok).
Not a big fan of this. And since noone else reviewed yet I'll close.