Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialExequiel R.
Courses Plus Student 16,828 PointsEvery time I try to misname the DB Sqlite create a new one with the wrong name ΒΏWhat can I do to solve that?
I'm working on the Workspace and every time I try to misname the DB as you did on the video to check the error handling Sqlite creates a new one, I don't know if this has happened to anyone else. I'm having the same issue on my terminal, I think its a Sqlite thing but I don't know why did Hampton managed to make it work.
2 Answers
Tomasz Budny
14,588 PointsThe point of this exercise to catch an error. Just make a different syntax error e.g.
$db = new PDO('sqliteee:./database.db');
Stephanie van Doleweerd
3,075 PointsThanks for asking about this. I was going nuts trying to get my connection to fail and couldn't.
Exequiel R.
Courses Plus Student 16,828 PointsExequiel R.
Courses Plus Student 16,828 PointsThanks for the answer Tomasz, I understood the point of the exercise but I couldn't catch the error I think I wasn't misnaming the "sqlite" part. Pretty stupid mistake. Thanks for your help anyway.