users@grizzly.java.net

Handling Exceptions in Grizzly Adapter

From: diyfiesta <toby.weston_at_gmail.com>
Date: Wed, 13 Oct 2010 22:38:03 -0700 (PDT)

Hi,

Following the basic getting started guide, all the examples I can find don't
bother handling exceptions. What's the preferred approach?

For example, I keep seeing...

            @Override
            public void service(GrizzlyRequest request, GrizzlyResponse
response) {
                try {
                    response.getWriter().println("hello world")));
                } catch (IOException e) {
                    // nothing
                }
            }

where getWriter may throw the IOException. How do you control error
responses etc (I can't add some error message to the response using
getWriter eg).

Cheers
-- 
View this message in context: http://old.nabble.com/Handling-Exceptions-in-Grizzly-Adapter-tp29959381p29959381.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.