front and back-end web development, Leeds, UK


Richard's Blog - Design, coding and life in Japan

Richard

SQLite3::SQLException: SQL logic error or missing database:

I found the following error in one of my unit tests

SQLite3::SQLException: SQL logic error or missing database: 

I had a quick look on google and found the following blog post

The started going into the fact that it is actually a duplication of an unique id in the database that is the issue, but went on to the fact that software developers do not think of all of the scenarios that could go wrong - hence not giving an apt error

Am I guilty of this?

I think a large number of web developers and software developers are. Do we allow for our Ajax calls should it not get the content expected - ie leave the process to hang and the user to give up when the internet connection goes down. Do we just let the app run on and hope for the best when db errors occur

What can I do?

  1. Frameworks - One of the beauties of newer web/javascript frameworks is that you can build validations and exceptions much much easier than in procedural days, take advantages by setting these up as soon as your project gets going, making it simple to display errors and messages when something happens
  2. Controllers/Action - think about each scenario that would stop the controller working and build in the messages right there
  3. Testing - add these scenarios to your tests!
Tags:

Recent Blog Posts