Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition
|>
Als je meer try-catch statements gebruikt kun je precies bepalen wat je wilt gaan doen als iets fout gaat, als je al iets wilt doen. Daarna kun je gezellig verder gaan.
Dit artikel geeft een aardig idee hoe ik het ook zou aanpakken.
overal waar ik een error als output wil hebben throw ik een exception. andere errors onderdruk ik. zo maak ik een systeem met eigen errors die ik goed begrijp zodat ik niet eeuwen hoef te gaan zoeken.
ja ok daar zit wat in ja. je kan nu idd niet meer zo makkelijk verder gaan met je code als je een niet fatal exception hebt. en dat artikel heb ik net gelezen
[ Voor 25% gewijzigd door tombo_inc op 13-03-2005 20:05 ]
Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition
|>
Nadat een error is afgehandeld wil je meestal weer verder gaan met de rest van je programma, als je alles in 1 try-catch druk gaat dat nogal moeilijk.
edit:
wat ik dus volgens jullie beter kan doen is gewoon in zeg maar iedere function zo'n blok zetten en dan vanuit daar alles af werken
[ Voor 24% gewijzigd door tombo_inc op 13-03-2005 20:22 ]
Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition