Toymods Car Club
www.toymods.org.au
F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Members Members    Search Search
Toymods » General Car Talk » hey java buffs

Show: Today's Posts  :: Show Polls 
Email to friend 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Nark
Forums Junkie


Location:
Cabramatta, NSW
Registered:
May 2002
      Nark@toymods.net/Work
Re: hey java buffs Tue, 06 May 2003 08:55 Go to previous messageGo to previous message
HKSPete wrote on Tue, 06 May 2003 17:46

Sorry I was a bit vage. I meant your IF statement was the right way to go (you are right, I'm not dissagreeing with you), but a specific try BLOCK (its a block not a bloody "loop"!! Mad ) for just a null pointer is silly. Which is exactly what you said in the quote.

As for elegant catches YUK. No such thing. A catch is ONLY if there is something that wasn't expected. If there is a possibility there is a null, test for it, don't expect the try block to pick it up. Putting more than e.printStackTrace() or throwing another exception within a catch block is disgusting code.


I didn't know there were this many java learners/programmers in Toymods Shocked Shocked . Just remember grasshopper(s):

Computers are a great way to make money. Money that can be spent on doing up toyotas!


Block, loop, you know what I meant. Razz
I have to sneak my foruming in between work (got management snooping around) so most of my replies aren't well thought out. Smile

I didn't say elegant catches, I meant elegant handling of thrown exceptions.
I disagree with you on the stack traces. They are evil. If you can handle an exception and can fix the problem, then do so at all costs. Stack traces are only useful if you're debugging.
And, no I don't catch NullPointerExceptions, I use the if/else blocks, but I'm not talking about null pointers specifically.
  Send a private message to this user    

SubjectPosterDate
Read Message   hey java buffs RA28Mon, 05 May 2003 05:56
Read Message   Re: hey java buffs CoryMon, 05 May 2003 06:23
Read Message   Re: hey java buffs NarkMon, 05 May 2003 07:31
Read Message   Re: hey java buffs RA28Mon, 05 May 2003 11:14
Read Message   Re: hey java buffs NarkTue, 06 May 2003 03:02
Read Message   Re: hey java buffs ehendrikdTue, 06 May 2003 03:40
Read Message   Re: hey java buffs SupraPeteTue, 06 May 2003 03:48
Read Message   Re: hey java buffs ehendrikdTue, 06 May 2003 03:57
Read Message   Re: hey java buffs NarkTue, 06 May 2003 05:51
Read Message   Re: hey java buffs SupraPeteTue, 06 May 2003 07:46
Read Message   Re: hey java buffs  NarkTue, 06 May 2003 08:55
Read Message   Re: hey java buffs SupraPeteTue, 06 May 2003 09:59
Read Message   Re: hey java buffs CoryTue, 06 May 2003 07:01
Read Message   Re: hey java buffs SupraPeteTue, 06 May 2003 03:52
Read Message   Re: hey java buffs justcallmefrankTue, 06 May 2003 08:05
Read Message   Re: hey java buffs SupraPeteTue, 06 May 2003 08:11
Read Message   Re: hey java buffs justcallmefrankTue, 06 May 2003 08:12
Read Message   Re: hey java buffs RibboTue, 06 May 2003 08:16
Read Message   Re: hey java buffs justcallmefrankTue, 06 May 2003 08:19
Previous Topic:Sydney autosalon
Next Topic:broken again

Goto Forum:
-=] Back to Top [=-

Current Time: Fri Sep 27 23:05:46 UTC 2024

Total time taken to generate the page: 0.0060069561004639 seconds

Bandwidth utilization bar

.:: Contact :: Home ::.

Powered by: FUDforum 2.3.8
Copyright ©2001-2003 Advanced Internet Designs Inc.