[Dune] Re: Exceptions im DGFParser.

Christian Engwer christi at uni-hd.de
Fri Jul 28 13:16:59 CEST 2006


Hi Robert,

I think we should include these others in this discussion as well...

On Fri, Jul 28, 2006 at 11:57:00AM +0200, Robert Kloefkorn wrote:
> Hi Christian,
> 
> erstmal Danke, dass Du Dir die Mühe gemacht hast, die aborts im DGF
> Parser durch Exceptions zu ersetzen. Leider bist Du eine kleines
> bisschen übers Ziel hinausgeschossen.
> 
> Wenn der Parser ein file bekommt, was nicht DGF ist, so hat er das
> früher direkt ans Gitter weitergegeben. Es könnte ja schon im richtigen
> Format sein. Diese Funktionalität hast Du hinausgenommen. Es ist nicht
> viel was man, da wieder ändern muss, ich werde das gleich mal einbauen,

What I did was that I changed all errors to exceptions (yes ... not
only the aborts). I you report an error the program should not
continue with out further interaction. Also I this that forwarding the
file implicitely is a rather strange behaviour. This part of dune is
called DGFParser and not GenericEveryFileReader. The user wants to
instatiate grid from a DGF file. Therefor he uses the dgfparser and I
tink he should then get a proper error, if the file is not a dgf
file. The other files will not work in general and it will lead to
further confusion, if the user can insatiate the alugrid from the
foo-file, but not the albertagrid.

> also nicht wundern, wenn sich da wieder ein bisschen was ändert.
> Wenn ansonsten noch Sachen unklar sind, wäre es echt nett, wenn vorher
> mal gefraagt wird. Man bekommt immer das Gefühl, das ihr denkt, wir

If I would have had doubts regarding my change I would have
asked. There are some places I didn't touch, because I was in doubt
and wanted to as you beforr doing any changes, just I didn't find the
time yet, the machines started to rise this morning...

> hätten uns nichts dabei gedacht, als wir das programmierten.
> Das kommt hier nicht so besonders gut an, aber ich gehe mal davon aus,
> dass das nicht absichtlich war. Und wie gesagt, danke, dass Du Dir die
> Mühe gamacht hast.

Well, you said that you (read as Freiburg) will not do further changes
at the dgf parser and that all changes in the interface should be
discussen on the list. I did hadn't had the feeling of changing the
interface. Sorry if I created trouble.

My 5 cents
  Christian




More information about the Dune mailing list