JaroslavTulach at 09:41, 15 September 2008 - 2008-09-15 09:41:49

←Older revision Revision as of 09:41, 15 September 2008
Line 11: Line 11:
best regards,
best regards,
-
josh.
+
josh.
--[http://www.sepix.de/blogs/blogrittner/index.html Aljoscha Rittner] 08:35, 15 September 2008 (CEST)
--[http://www.sepix.de/blogs/blogrittner/index.html Aljoscha Rittner] 08:35, 15 September 2008 (CEST)
</div>
</div>
 +
 +
One can always use getStackTrace/setStackTrace methods on an exception to adjust the stacktrace, but indeed, that means everything is getting more complicated.
 +
 +
--[[User:JaroslavTulach|JaroslavTulach]] 09:41, 15 September 2008 (UTC)

80.128.113.214: Comment provided by Aljoscha Rittner - via ArticleComments extension - 2008-09-15 06:35:35

Comment provided by Aljoscha Rittner - via ArticleComments extension

New page

<noinclude>Comments on [[APIDesignPatterns:Exceptions]]
<comments />
----- __NOEDITSECTION__</noinclude>

== Aljoscha Rittner said ... ==

<div class='commentBlock'>
"On the other hand, Chapter 5 also advices to prefer factory methods over exposing constructors. I tried that few times, but I have a feeling that this feels a bit unnatural and as such I cannot recommend code like: " [...factory sample...]

It's not only unnatural, a static factory hides the real exception point into the stacktrace.

best regards,
josh.

--[http://www.sepix.de/blogs/blogrittner/index.html Aljoscha Rittner] 08:35, 15 September 2008 (CEST)
</div>