-
Notifications
You must be signed in to change notification settings - Fork 2.5k
How can i check true errors? #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a JavaScript language question. The short answer is you only need to do |
but not run my console.log and haver error, err is a object and not be true so not enough simple if(err) |
All objects in JavaScript are true. There is no object that would be false. |
ahh i found the problem when i use |
What better |
If you are using Express, you should be doing |
PR mysqljs#838 introduced a fix for the driver's custom Value Converter that stopped emitting large uint64 `driver.Value`s as a string. Instead, now _all_ uint{8,16,32,64} values passed to the driver are returned as uint64, and `packets.c` now explicitly handles `driver.Value` instances that are uint64. However, the update in `packets.c` only applies when sending `driver.Value` arguments to the server. When a connection is set up using `InterpolateParams = true` and query interpolation happens inside of the driver, the `(*mysqlConn) interpolateParams` does **not** handle uint64 values (which, again, are now passed by `database/sql` because we've updated our value converter to generate them). Because of this, any `DB.Query` operations which have an uint argument (regardless of its size!!) will force the driver to return `driver.ErrSkip`, disabling client interpolation for such queries. We can fix this by updating `interpolateParams` like we previously updated `writeExecutePacket`.
i have a callback function
True error here is a object: who say me table database.user is not exist
but this is a object error and my if is be false so i dont watch the error.
but without if only
console.log(err)
i see the true error.how need use?
if(typeof err === 'object' || typeof err !== 'undefined')
?The text was updated successfully, but these errors were encountered: