• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

handling of flag-values different from the well-defined ones

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy ranchers,

my specification mandates to throw a RecordNotFoundException, if either the specified record cannot be found or has a deleted-flag.
Actually the assignment defines two different values for the short flag:
  • 0x0000 = valid
  • 0x0080 = deleted

  • What, if due to some mysterious failure to hard drive, the flag I receive turns out to be neither one of those specified?

    Is it legal to also throw a RecordNotFoundException in this special case? Or does it have to be one of a different type to exactly match the specification? Or is it better to ignore this problem at all?

    Regards,
    Andy

     
    Sheriff
    Posts: 11604
    178
    Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Andy,

    I only did the following check

    I think taking care with hard disk failures is a bridge (maybe even 2 or 3) too far.

    Kind regards,
    Roel
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic