Re: [tryton] dont show stack trace on exceptions
On 07-Jul-2015, at 8:39 pm, Cédric Krier cedric.kr...@b2ck.com wrote: On 2015-07-07 07:34, Mariano Ramon wrote: On Monday, July 6, 2015 at 6:40:06 PM UTC-3, Cédric Krier wrote: On 2015-07-06 12:27, Mariano Ramon wrote: is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message? By definition a traceback is an exception that is not expected. Hiding it will just result of never fixing the problem, so that's why Tryton shows such unexpected error. If you want a friendly message, you must write code that doesn't crash unexpectly. Of course, it was not intended as a solution. I asked because frameworks usually have a debug mode that works like it does now and the prodution mode where internals are not leaked in case of a bug. What will be leaked that is not already public? Also it is the best way to have issue in production that you can not fix because you don't know how to as you don't have the traceback. Its about hiding the traceback from end user because he cannot understand it. I feel passing trace to softwares like sentry[1] helps you to debug it easily and you are not losing stack trace anyway :) [1] https://github.com/getsentry/sentry https://github.com/getsentry/sentry -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com mailto:cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ http://www.b2ck.com/ signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [tryton] dont show stack trace on exceptions
On 2015-07-07 21:02, Prakash Pandey wrote: On 07-Jul-2015, at 8:39 pm, Cédric Krier cedric.kr...@b2ck.com wrote: On 2015-07-07 07:34, Mariano Ramon wrote: On Monday, July 6, 2015 at 6:40:06 PM UTC-3, Cédric Krier wrote: On 2015-07-06 12:27, Mariano Ramon wrote: is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message? By definition a traceback is an exception that is not expected. Hiding it will just result of never fixing the problem, so that's why Tryton shows such unexpected error. If you want a friendly message, you must write code that doesn't crash unexpectly. Of course, it was not intended as a solution. I asked because frameworks usually have a debug mode that works like it does now and the prodution mode where internals are not leaked in case of a bug. What will be leaked that is not already public? Also it is the best way to have issue in production that you can not fix because you don't know how to as you don't have the traceback. Its about hiding the traceback from end user because he cannot understand it. But it can share it. Like for example, report the issue to the Tryton bugtracker. I feel passing trace to softwares like sentry[1] helps you to debug it easily and you are not losing stack trace anyway :) We develop quite well Tryton with the current behaviour. Of course, you can collect traceback like you want using any customize logging handler, that's the purpose of the logging configuration. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/ pgpCBPX8_z1p2.pgp Description: PGP signature
Re: [tryton] dont show stack trace on exceptions
On 2015-07-07 07:34, Mariano Ramon wrote: On Monday, July 6, 2015 at 6:40:06 PM UTC-3, Cédric Krier wrote: On 2015-07-06 12:27, Mariano Ramon wrote: is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message? By definition a traceback is an exception that is not expected. Hiding it will just result of never fixing the problem, so that's why Tryton shows such unexpected error. If you want a friendly message, you must write code that doesn't crash unexpectly. Of course, it was not intended as a solution. I asked because frameworks usually have a debug mode that works like it does now and the prodution mode where internals are not leaked in case of a bug. What will be leaked that is not already public? Also it is the best way to have issue in production that you can not fix because you don't know how to as you don't have the traceback. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
Re: [tryton] dont show stack trace on exceptions
On Monday, July 6, 2015 at 6:40:06 PM UTC-3, Cédric Krier wrote: On 2015-07-06 12:27, Mariano Ramon wrote: is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message? By definition a traceback is an exception that is not expected. Hiding it will just result of never fixing the problem, so that's why Tryton shows such unexpected error. If you want a friendly message, you must write code that doesn't crash unexpectly. Of course, it was not intended as a solution. I asked because frameworks usually have a debug mode that works like it does now and the prodution mode where internals are not leaked in case of a bug. Mariano
[tryton] dont show stack trace on exceptions
is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message?
Re: [tryton] dont show stack trace on exceptions
I think you are looking for this : https://github.com/openlabs/trytond-sentry Le lun. 6 juil. 2015 23:05, Mariano Ramon marianog.ra...@gmail.com a écrit : is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message?
Re: [tryton] dont show stack trace on exceptions
On 2015-07-06 12:27, Mariano Ramon wrote: is there anyway to customize runtime errors that show the python exception and use a catch all with a more user friendly message? By definition a traceback is an exception that is not expected. Hiding it will just result of never fixing the problem, so that's why Tryton shows such unexpected error. If you want a friendly message, you must write code that doesn't crash unexpectly. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com Tel: +32 472 54 46 59 Website: http://www.b2ck.com/