velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany" <>
Subject Re: No way to catch runtime errors?
Date Sun, 24 Mar 2002 14:05:08 GMT
----- Original Message -----
From: "Geir Magnusson Jr." <>
Sent: Sunday, March 24, 2002 12:00 PM

> On 3/24/02 5:28 AM, "Daniel Dekany" <> wrote:
> >>> But how can I log without the rsvc?
> >>
> >> I can give you a logger.
> >
> > And if I need to read a runtime property, then you give me a property
> > too?
> > Why are you reluctant about passing the rsvc? This is a public interface
> > (RuntimeServices).
> But not for applications.  There's a long-standing philosophy to keep apps
> out of the core.  Event handling is an app function.

Ahh, I see. I adopt the argument. Then pass a VelocityEngine. That's for
apps, right?
(A little technical complication: AFAIK inside Velocity engine the class
VelocityEngine is not very in use, but RunntimeInstance class and
RunntimeServices interface is. So perhaps we don't have a VelocityEngine
instance that we can send to the event handler. Altrought VelocityEngine is
just a very thin wrapper over a RunntimeInstance (as it exists today) it
would not be a good idea to create a new instance for every event calls. So
perhaps we could store one instance in the RunntimeInstance and pull it out
when needed.)

> > Error handlers are created to influence the operation of
> > Velocity core.
> Actually, they are called event handlers, and their purpose is to give the
> application code finer ability and control in the rendering process.

Then we have talked about two different things here. I don't stick to event
handlers. I just want error handling (which may can be implemented with
event handlers).


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message