You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Denis <ji...@respublica.fr> on 2002/05/10 17:00:31 UTC

Exceptions in Velocity

Hi,
I don't know what to do with the exceptions from Velocity....
What kind of exception does Velocity.init() throw? (throws Exception)
How can Velocity.evaluate(Context, Writer, String, String) throw a ResourceNotFoundException?

Puzzled now.
Cheers,
-- Denis.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Exceptions in Velocity

Posted by Denis <br...@euro.apple.com>.
On Friday, May 10, 2002, at 04:10 PM, Geir Magnusson Jr. wrote:

> On 5/10/02 11:00 AM, "Denis" <ji...@respublica.fr> wrote:
>
>> Hi,
>> I don't know what to do with the exceptions from Velocity....
>> What kind of exception does Velocity.init() throw? (throws Exception)
>
> If init() throws an exception, it's bad, and you are done.  It should never
> throw unless things are really wacked.

Ok, then I'd better throw if there is an exception in init()


> If that answer doesn't satisfy you, can you be more specific? :)
>
>> How can Velocity.evaluate(Context, Writer, String, String) throw a
>> ResourceNotFoundException?
>
> If you have a #parse("foo.vm") in the String, and it can't find "foo.vm"....

Understood....
Thank you very much

-- Denis.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Exceptions in Velocity

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 5/10/02 11:00 AM, "Denis" <ji...@respublica.fr> wrote:

> Hi,
> I don't know what to do with the exceptions from Velocity....
> What kind of exception does Velocity.init() throw? (throws Exception)

If init() throws an exception, it's bad, and you are done.  It should never
throw unless things are really wacked.

If that answer doesn't satisfy you, can you be more specific? :)

> How can Velocity.evaluate(Context, Writer, String, String) throw a
> ResourceNotFoundException?

If you have a #parse("foo.vm") in the String, and it can't find "foo.vm"....


-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>