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


Mark Wielaard wrote:
Hi Phil,

On Thu, 2007-11-15 at 17:01 +0000, Phil Muldoon wrote:
As talked about on IRC over the corefile message design, exceptions can and are used to carry warnings, messages and so on. How do you differentiate between a warning and an error in this case?

By using different exception types, so a higher level can distinquish
between a "recoverable" warning and a "unrecoverable" error.

Like I mentioned in reply to Sami's email yesterday, having a napi throw several different unchecked exception types places a huge and unfair burden on the user to know the code beyond the api. The places "must be an expert on Frysk to call Frysk apis" charge at our feet.


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.

What would be helpful here? It's a message, not an error? Basically it just means cannot read the address here as we don't know how to read it. I can format the message however I want, but it is still not an error message. However it sure looks like one now ;)


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.

No in the my case. Corecommand is just there to bootstrap a corefile into fhpd and report back any messages and/or errors it receives.



Regards


Phil


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