As a top-level handler? To avoid littering it throughout the code? Then we
can follow the general principal, that when something bad happens that you
cannot deal with, raise it and let it fall through all the way to this
handler.
On 11/04/07, Robert Godfrey <[EMAIL PROTECTED]> wrote:
Generally I think
catch(Error e)
{
try
{
// try to do some log here perhaps
}
finally
{
System.exit(1);
}
}
Error is bad :-)
On 11/04/07, Martin Ritchie <[EMAIL PROTECTED]> wrote:
>
> For OOM I would agree that recover mode == System.exit :)
>
> On 11/04/07, Rupert Smith <[EMAIL PROTECTED]> wrote:
> > I'm in definite agreement with this point of view.
> >
> > As I go through the errors I'm taking note of suspiciously unhandled
> > conditions, and should get around to turning them into JIRA's at some
> point.
> >
> > Rupert
> >
> > On 11/04/07, Robert Godfrey <[EMAIL PROTECTED]> wrote:
> > >
> > > > And there is the current problem. we don't have top-level error
> > > > handlers in place in the broker. Hence things like OutOfMemory
> Errors
> > > > cause the broker to grind to a halt rather than entering any
> recovery
> > > > mode.
> > >
> > >
> > > I shall repeat my view that an OOM error should bring the broker to
> and
> > > *abrupt* halt (rather than a grinding one) since there is *nothing*
> you
> > > can
> > > reliably do once you get to this point. The trick is to try to
ensure
> > > that
> > > you never hit this point.
> > >
> > > However the best thing to do with unrecoverable errors is to exit
> quickly
> > > and as cleanly as possible.
> > >
> > > -- Rob
> > >
> >
>
>
> --
> Martin Ritchie
>