Should I print an exception stack trace?

How inefficient is it to get a stack trace for an exception? I know it is expensive, but how expensive? Should they definitely not be used in a production environment?

+3
source share
5 answers

In a production environment, it is useful to register a stack trace so that the user can find it when they call for technical support. Avoid printing a stack trace instead of a clear (by a typical user) message.

You do not have to worry about the effectiveness of exceptional code blocks. Recovery failure is the most important thing here.

+13
source

, . , IMO.

+5

: , - ? , , ?

+5

- , , .

. , ( ..).

.

+1

, , , . , , .

0

All Articles