• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why am i getting these errors ?  RSS feed

 
Arnold Strong
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see the photo too. code-



error 1-


error2-

snip.JPG
[Thumbnail for snip.JPG]
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the URL constructor throws a MalformedURLException exception, it won't return a value and so documentListFeedUrl wont be initialised.
 
Arnold Strong
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adrian Burkett wrote:If the URL constructor throws a MalformedURLException exception, it won't return a value and so documentListFeedUrl wont be initialised.


Should i do a "throws exception" instead of "surround with try-catch" instead ?
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arnold Strong wrote:Should i do a "throws exception" instead of "surround with try-catch" instead ?

That's an option, but without knowing the design of your program it's hard to say. It all depends where you want to handle the error.
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arnold Strong wrote:Should i do a "throws exception" instead of "surround with try-catch" instead ?


Read through Exception Handling and also about Exceptions.
It will save you a lot of hard work.

By the way by your various posts I have learned you are trying to master the Google Analytics API.
Agree it looks flashy to have learnt it. But knowing java programming is a prerequisite and a much better deal in fact.

Happy learning.
Cheers!
 
Arnold Strong
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Giving up on the useless google API. I am doing Spring !
See you guys !
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!