An exception always has a stacktrace, which is dependent on where you throw it.
You can disable the fill-in of the stacktrace using the appropriate constructor, though. There are rare cases in which such a exception can make sense, but not in a normal application.
d
Dico
07/22/2019, 9:28 AM
If exception is used as integral part of control flow, it makes sense to throw the same instance each time from a performance perspective
k
kralli
07/22/2019, 9:38 AM
Though exceptions should not be used as control flow.