Re: [Bluemusic-devel] Similar bug, but what to do?
Brought to you by:
kunstmusik
From: Michael B. <got...@ya...> - 2005-03-20 15:16:11
|
That sounds good. I'm confused, though, as to why you would want to bubble up a RuntimeException with the CSDRender class. If the error is being caught and dealt with at the CSDRender class, why propogate the error further and "crash" the whole system? Michael Bechard --- Steven Yi <ste...@gm...> wrote: > Hi Michael, > > You raise a good issue. I prefer that things not be > silently ignored > and messages be posted to the user and no CSD is > outputted. The > easiest way I can think of is creating a > SoundObjectException and > NoteProcessorException classes that soundObjects can > raise and bubble > up to the CSDRender class. That class can then > report messages and > kill the compilation process. > > For the time being, I have largely allowed the > processors to throw > exceptions to kill the stack as a primitive > (lazy...) way to do this. > I guess for me it hasn't been a problem to figure > out what's going on > as stack traces are easy for me to follow as a Java > Programmer, but > for users I'm sure it makes no sense. > > At the end of the chain (CSDREnder I guess), all > exceptions could be > wrapped in a RuntimeException so that calling > classes wouldn't have > to explicitly catch the exception and the > RuntimeException can bubble > up to kill the stack. > > How's that sound? > > steven > > > On Sat, 19 Mar 2005 14:47:50 -0800 (PST), Michael > Bechard > <got...@ya...> wrote: > > I've found a bug similar to the one I just fixed. > > It's with the EqualsProcessor (and probably other > > processors as well); if the pfield it's trying to > do > > its processing on is not there, it will crash. > > > > Now the question I've got is, do we just have the > app > > silently ignore that pfield and have the processor > > process the rest of the notes, or do we alert the > user > > about this problem, or a combination of both; I'd > > think some kind of alert would be best. But the > > problem goes a little deeper than that. What if > > someone were inadvertently trying to apply a > > PchAddProcessor to a negative pfield? There are > all > > sorts of situations that may not make sense to a > note > > processor and cause it to crash, so should we add > that > > error checking into all of the processors? > > > > I feel silly for running into this problem in the > > first place, because really I ought to be paying > more > > attention to my polyObjects and note processors > (am I > > the only user who has encountered this sort of > > thing?). However, mistakes will happen, and the > > application should be smart enough to catch them. > When > > the application simply won't generate a CSD > because of > > these problems, the user has no idea where to > begin to > > look for the problem and wastes alot of time > digging > > around. > > > > Michael Bechard > > > > __________________________________ > > Do you Yahoo!? > > Make Yahoo! your home page > > http://www.yahoo.com/r/hs > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT > Products from real users. > > Discover which products truly live up to the hype. > Start reading now. > > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > Bluemusic-devel mailing list > > Blu...@li... > > > https://lists.sourceforge.net/lists/listinfo/bluemusic-devel > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Bluemusic-devel mailing list > Blu...@li... > https://lists.sourceforge.net/lists/listinfo/bluemusic-devel > __________________________________ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250 |