Re: [Windows] Associate file extensions with a program

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
> 
> Juergen Luethje wrote:
> 
> > I can see that implementation #1 is not a good idea, but what about
> > implementation #2?
>
> If there is an error in proc1, such as FileDoesNotExist, then it would
> not help matters to replace this with ErrorWritingToFile in proc2.
> 
> In fact, wouldn't most error conditions tend to daisy-chain?

Yes.  It's important to allow for errors to propagate back up through
the call chain.  I've done this a couple of different ways in EuSQL and
in matheval.  In EuSQL, all functions return a sequence on success, and 
an integer on failure.  After pretty much every call from a library 
routine to another, I check this condition, and simply return the error
code.  There is also an extended error message that can be set, and that
an application can request.

In matheval, I defined a separate type, called INVALID.  Each matheval
type is smart enough to only operate on other types that it understands,
so the INVALID type is simply passed back.  Part of the INVALID type is
an error message.

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu