Welcome Guest, Not a member yet? Register   Sign In
DBForge should move to using ErrorException

Currently, when DBForge encounters an error, for example: "CREATE DATABASE default" it shows an error.
I think it only makes sense it to just through an ErrorException, so it is catchable.

It's not supposed to trigger errors in the first place ...

(This post was last modified: 10-19-2016, 10:36 AM by AmitMY.)

I apologise. I meant to say that when I run it, and the database already exists, it shows an error.

Here is the error it is showing, when running `create_database("default")`

"heading":"A Database Error Occurred",
"Error Number: 1007","Can't create database 'default'; database exists","CREATE DATABASE `default` CHARACTER SET utf8 COLLATE utf8_unicode_ci",
"Filename: ....\/system\/database\/DB_driver.php",
"Line Number: 691"

`CREATE DATABASE IF NOT EXISTS` however does not show an error, so I added that option

It shows an error only with db_debug On, which is exactly what it should do.

Theme © iAndrew 2016 - Forum software by © MyBB