From: <web...@st...> - 2002-12-09 14:02:34
|
On Tue, 3 Dec 2002 kea...@na... wrote: | I've puzzled over this piece of code before. Apparently there is the | ability to pass parameters from the configuration to the tools constructor, | but AFAIK noone has ever used this. So it is kind of annoying that this | code always gets executed. | | I don't think there's a big hit with throwing and immediately catching the | exceptions, but all the diagnostic logging is annoying. I suppose it would | be cleaner to just check for the constructors directly and avoid trying to | invoke them if they don't exist. I could make this change if folks agree. Throwing an Exception is _expensive_. Filling in the stack-trace takes ages. One should _never_ use Exception-throwing in the normal code-path. Exceptions are for .. yes .. exceptions. It should only be used in the "rare-case", not the "common-case". The VM must also handle the Exception blocks, by going in and out of the try-blocks (there is a "machine-code" for doing this). -- Mvh, Endre Stølsvik M[+47 93054050] F[+47 51625182] Developer @ CoreTrek AS - http://www.coretrek.com/ CoreTrek corporate portal / EIP - http://www.corelets.com/ |