
front and back-end web development, Leeds, UK
Richard's Blog - Design, coding and life in Japan
SQLite3::SQLException: SQL logic error or missing database:
Submitted by Richard on Wed, 10/21/2009 - 10:07I 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?
- 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
- Controllers/Action - think about each scenario that would stop the controller working and build in the messages right there
- Testing - add these scenarios to your tests!
Tags:
Recent Blog Posts
- Testing controllers in Lithium 2nd Feb 12, 18:19
- Practical Internationalization in Lithium 31st Dec 11, 02:06
- Using OAuth in Lithium 30th Dec 11, 23:47
- How to add your own Tokens from CCK fields in Druapl 7 17th Jun 11, 04:49
- Weaving Lithium #li3 into a legacy PHP application incrementally 5th Oct 10, 11:54