• Post Reply Bookmark Topic Watch Topic
  • New Topic

Skip/Don't throw exception if FTP transfer fails  RSS feed

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

Im using org.apache.commons.net's FTP object to make FTP transfers. The problem is that when the IP is down (example, the PC is turned off) a exception saying "No route to host" pops up and not only delays my program but gives a nasty error. How can I avoid this?

Thank you
 
Sheriff
Posts: 21136
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Catch the exception.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!