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 trialSajid Latif
Full Stack JavaScript Techdegree Student 22,368 PointsMy database works even if I spells it wrong. Who can help me? https://w.trhou.se/h6x7yjemq1
The strange part is that the database works even if I spells it wrong. So it wong catch it from at try catch block. Who can help me?
3 Answers
Karalyn Heath
18,033 PointsWorkspace seems to create a new database file automatically when we misspell the file name. I had to refresh the file view to see this. Using another syntax error will display the error block. Such as,
$db = new PDO('ssssqlite:./database.db');
Sajid Latif
Full Stack JavaScript Techdegree Student 22,368 PointsI can see it is copying the database. Maybe we have an error in the system. What do you people think?
kabir k
Courses Plus Student 18,036 PointsHi Sajid,
There's probably a setting that the teacher made on his computer that we haven't made that makes our exact same code behave differently.
Cory Hooyman
Python Web Development Techdegree Student 10,703 PointsCory Hooyman
Python Web Development Techdegree Student 10,703 PointsThank you for this Karalyn!
Γlex K
7,809 PointsΓlex K
7,809 PointsTrue! Thx Karalyn!