Skip to content

Commit 0d18e59

Browse files
committed
docs: tweaks to error handling documentation
refs: mysqljs#1332
1 parent ecf9b62 commit 0d18e59

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Readme.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,14 +1048,15 @@ connection.query({sql: 'SELECT COUNT(*) AS count FROM big_table', timeout: 60000
10481048
This module comes with a consistent approach to error handling that you should
10491049
review carefully in order to write solid applications.
10501050

1051-
All errors created by this module are instances of the JavaScript [Error][]
1052-
object. Additionally they come with two properties:
1051+
Most errors created by this module are instances of the JavaScript [Error][]
1052+
object. Additionally they typically come with two extra properties:
10531053

10541054
* `err.code`: Either a [MySQL server error][] (e.g.
1055-
`'ER_ACCESS_DENIED_ERROR'`), a node.js error (e.g. `'ECONNREFUSED'`) or an
1056-
internal error (e.g. `'PROTOCOL_CONNECTION_LOST'`).
1055+
`'ER_ACCESS_DENIED_ERROR'`), a Node.js error (e.g. `'ECONNREFUSED'`) or an
1056+
internal error (e.g. `'PROTOCOL_CONNECTION_LOST'`).
10571057
* `err.fatal`: Boolean, indicating if this error is terminal to the connection
1058-
object.
1058+
object. If the error is not from a MySQL protocol operation, this properly
1059+
will not be defined.
10591060

10601061
[Error]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error
10611062
[MySQL server error]: http://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html

0 commit comments

Comments
 (0)