Skip to content

Commit 43746ed

Browse files
committed
Added JSDoc for Neo4jError class
So that it becomes visible in the API docs at http://neo4j.com/docs/api/javascript-driver/current/.
1 parent 9040f4e commit 43746ed

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/v1/error.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,17 @@ function newError(message, code="N/A") {
3939
return new Neo4jError(message, code);
4040
}
4141

42+
/**
43+
* Class for all errors thrown/returned by the driver.
44+
*/
4245
class Neo4jError extends Error {
43-
constructor( message, code="N/A" ) {
46+
47+
/**
48+
* @constructor
49+
* @param {string} message - The error message.
50+
* @param {string} code - Optional error code. Will be populated when error originates in the database.
51+
*/
52+
constructor(message, code = 'N/A') {
4453
super( message );
4554
this.message = message;
4655
this.code = code;

0 commit comments

Comments
 (0)