This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fhpd vs RuntimeExceptions


On Thu, Nov 15, 2007 at 06:41:56PM +0100, Mark Wielaard wrote:
> Hi Phil,
> > << Example exception output deleted - see original message for details. >>
> > If this is the way forward, I'll have to gobble exceptions locally in 
> > CoreCommand, and just deal with them locally.
> 
> Yes, I think that is the way forward. Something terribly failed. And
> just passing the "address 6992f8 cannot be found in metadata table."
> message to the user is clearly not very helpful if the user just wanted
> to run a specific command. Only the command knows if this is something
> fatal or not and should catch it at the appropriate level and report
> what the exact action was that was attempted and which structure
> couldn't be created because of the error.

I do not think that an exception like this should ever get handled at the
level of the command module.  In fact, in a case like this it should never
have floated up that high without getting handled.  Clearly, being unable to
peek at the given address was the result of trying to do some action.  The
failure to peek at the address either causes that action to fail, or it can be
ignored (or otherwise recovered from).  Either way, the command module should
not be exposed to this level of detail (though the information may need to be
retained as a nested exception for more verbose output, etc...).

This is similar to the famous NullPointerException.  I'd expect we all agree
that one of those should never ever float up all the way to the fhpd.

	Cheers,
	Kris


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]