• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data class Exceptions.

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
Are the exceptions defined in Data class are to be catch there itself such as the same original code is or shall they be defined on method header, especially IOException such that client may be notified that what problem had occured on db side.
Thank you,
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gurpreet,
If the Data method threw DatabaseException, I also threw it in my DataAccess interface and let the client deal with it. I also threw my own DatabaseExceptions in some other cases like attempting to modify a record without owning the record lock. I also created an InvalidDataFileException which extended IOException, but it was only for initial integrity check on server boot.
Hope this helps,
Michael Morris
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic