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

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.
Reply
#2

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

(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",
"message":[
"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
Reply
#4

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




Theme © iAndrew 2016 - Forum software by © MyBB